NanoByte.Common  2.9.0
NanoByte.Common.Dispatch.BucketRule< TElement, TValue > Class Template Reference

A rule for Bucketizer<T>. More...

Public Member Functions

 BucketRule (Predicate< T > predicate, ICollection< T > bucket)
 Creates a new bucket rule. More...
 
 BucketRule (TValue value, ICollection< TElement > bucket)
 Creates a new bucket rule. More...
 

Public Attributes

readonly Predicate< T > Predicate
 A condition to check elements against. More...
 
readonly ICollection< T > Bucket
 The collection elements are added to if they match the Predicate. More...
 
readonly TValue Value
 A value to check elements against. More...
 
readonly ICollection< TElement > Bucket
 The collection elements are added to if they match the Value. More...
 

Detailed Description

A rule for Bucketizer<T>.

A rule for Bucketizer<TElement,TValue>.

Constructor & Destructor Documentation

◆ BucketRule() [1/2]

NanoByte.Common.Dispatch.BucketRule< TElement, TValue >.BucketRule ( Predicate< T >  predicate,
ICollection< T >  bucket 
)
inline

Creates a new bucket rule.

Parameters
predicateA condition to check elements against.
bucketThe collection elements are added to if they match the predicate .

◆ BucketRule() [2/2]

NanoByte.Common.Dispatch.BucketRule< TElement, TValue >.BucketRule ( TValue  value,
ICollection< TElement >  bucket 
)
inline

Creates a new bucket rule.

Parameters
valueA value to compare with the result of the value retriever using object.Equals(object,object).
bucketThe collection elements are added to if they match the value .

Member Data Documentation

◆ Bucket [1/2]

readonly ICollection<T> NanoByte.Common.Dispatch.BucketRule< TElement, TValue >.Bucket

The collection elements are added to if they match the Predicate.

◆ Bucket [2/2]

readonly ICollection<TElement> NanoByte.Common.Dispatch.BucketRule< TElement, TValue >.Bucket

The collection elements are added to if they match the Value.

◆ Predicate

readonly Predicate<T> NanoByte.Common.Dispatch.BucketRule< TElement, TValue >.Predicate

A condition to check elements against.

◆ Value

readonly TValue NanoByte.Common.Dispatch.BucketRule< TElement, TValue >.Value

A value to check elements against.


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