Class CollectionTally
CollectionTally counts (tallies) the number of occurrences of each object in one or more enumerations.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public sealed class CollectionTally
Constructors
View SourceCollectionTally(NUnitEqualityComparer, IEnumerable)
Construct a CollectionTally object from a comparer and a collection.
Declaration
public CollectionTally(NUnitEqualityComparer comparer, IEnumerable c)
Parameters
Type | Name | Description |
---|---|---|
NUnitEqualityComparer | comparer | The comparer to use for equality. |
IEnumerable | c | The expected collection to compare against. |
Properties
View SourceResult
The result of the comparison between the two collections.
Declaration
public CollectionTally.CollectionTallyResult Result { get; }
Property Value
Type | Description |
---|---|
CollectionTally.CollectionTallyResult |
Methods
View SourceTryRemove(IEnumerable)
Try to remove a set of objects from the tally.
Declaration
public void TryRemove(IEnumerable c)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable | c | The objects to remove. |
TryRemove(object)
Try to remove an object from the tally.
Declaration
public void TryRemove(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o | The object to remove. |