Table of Contents

Class CollectionTally

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

CollectionTally counts (tallies) the number of occurences of each object in one or more enumerations.

public class CollectionTally
Inheritance
CollectionTally
Inherited Members

Constructors

CollectionTally(NUnitEqualityComparer, IEnumerable)

Construct a CollectionTally object from a comparer and a collection

public CollectionTally(NUnitEqualityComparer comparer, IEnumerable c)

Parameters

comparer NUnitEqualityComparer
c IEnumerable

Properties

Count

The number of objects remaining in the tally

public int Count { get; }

Property Value

int

Methods

TryRemove(IEnumerable)

Try to remove a set of objects from the tally

public bool TryRemove(IEnumerable c)

Parameters

c IEnumerable

The objects to remove

Returns

bool

True if successful, false if any object was not found

TryRemove(object)

Try to remove an object from the tally

public bool TryRemove(object o)

Parameters

o object

The object to remove

Returns

bool

True if successful, false if the object was not found