IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Constraints.CollectionTally Class Reference

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

+ Collaboration diagram for NUnit.Framework.Constraints.CollectionTally:

Public Member Functions

 CollectionTally (NUnitEqualityComparer comparer, IEnumerable c)
 Construct a CollectionTally object from a comparer and a collection More...
 
bool TryRemove (object o)
 Try to remove an object from the tally More...
 
bool TryRemove (IEnumerable c)
 Try to remove a set of objects from the tally More...
 

Properties

int Count [get]
 The number of objects remaining in the tally More...
 

Private Member Functions

bool ItemsEqual (object expected, object actual)
 

Private Attributes

readonly List< object > list = new List<object>()
 
readonly NUnitEqualityComparer comparer
 

Detailed Description

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

Constructor & Destructor Documentation

NUnit.Framework.Constraints.CollectionTally.CollectionTally ( NUnitEqualityComparer  comparer,
IEnumerable  c 
)
inline

Construct a CollectionTally object from a comparer and a collection

Member Function Documentation

bool NUnit.Framework.Constraints.CollectionTally.ItemsEqual ( object  expected,
object  actual 
)
inlineprivate
bool NUnit.Framework.Constraints.CollectionTally.TryRemove ( object  o)
inline

Try to remove an object from the tally

Parameters
oThe object to remove
Returns
True if successful, false if the object was not found

Referenced by NUnit.Framework.Constraints.NUnitEqualityComparer.DictionariesEqual(), and NUnit.Framework.Constraints.CollectionEquivalentConstraint.Matches().

bool NUnit.Framework.Constraints.CollectionTally.TryRemove ( IEnumerable  c)
inline

Try to remove a set of objects from the tally

Parameters
cThe objects to remove
Returns
True if successful, false if any object was not found

Member Data Documentation

readonly List<object> NUnit.Framework.Constraints.CollectionTally.list = new List<object>()
private
readonly NUnitEqualityComparer NUnit.Framework.Constraints.CollectionTally.comparer
private

Property Documentation

int NUnit.Framework.Constraints.CollectionTally.Count
get

The documentation for this class was generated from the following file: