Sphyrnidae Common Library  2.0.1
Shared Utilities/Library
Sphyrnidae.Common.BinaryList< T, TKey > Class Template Reference

A class that allows binary operations More...

Inheritance diagram for Sphyrnidae.Common.BinaryList< T, TKey >:

Public Member Functions

virtual IList< T > FindBinaryList (TKey key)
 Retrieves a subset of the list matching the key More...
 
virtual T FindBinary (TKey key)
 Retrieves a single entry from the list matching the key More...
 
virtual bool Has (TKey key)
 Specifies if the BinaryList has the given key (similar to Contains or Any) More...
 
virtual int BinarySearch (TKey key)
 Returns the index of the element (so that you know for sure if you found something) More...
 
virtual IEnumerable< T2 > Intersect< T2 > (IEnumerable< T2 > list, Func< T2, TKey > keySelector)
 Returns the items from the provided enumeration that match (intersect) on the provided key (Eg. Join where selecting the provided enumeration objects) More...
 
virtual IEnumerable< T2 > NonIntersect< T2 > (IEnumerable< T2 > list, Func< T2, TKey > keySelector)
 Returns the items from the provided enumeration that don't match (intersect) on the provided key (eg. left join where not exists; selecting the provided enumeration objects) More...
 

Properties

Func< T, TKey > KeySelector [get]
 

Detailed Description

A class that allows binary operations

Template Parameters
TAny object type
TKeyThe type of object (eg. string) that the list is ordered by (the key) - it must be IComparable
Type Constraints
TKey :IComparable<TKey> 

Member Function Documentation

◆ BinarySearch()

virtual int Sphyrnidae.Common.BinaryList< T, TKey >.BinarySearch ( TKey  key)
virtual

Returns the index of the element (so that you know for sure if you found something)

Parameters
keyThe value of the key
Returns
The index in the list, or -1 if not found

◆ FindBinary()

virtual T Sphyrnidae.Common.BinaryList< T, TKey >.FindBinary ( TKey  key)
virtual

Retrieves a single entry from the list matching the key

Parameters
keyThe value of the key
Returns
The single item if found, otherwise the default value (eg. null, or "", or 0... etc)

◆ FindBinaryList()

virtual IList<T> Sphyrnidae.Common.BinaryList< T, TKey >.FindBinaryList ( TKey  key)
virtual

Retrieves a subset of the list matching the key

Parameters
keyThe value of the key
Returns
The subset of the list (or empty list if none match)

◆ Has()

virtual bool Sphyrnidae.Common.BinaryList< T, TKey >.Has ( TKey  key)
virtual

Specifies if the BinaryList has the given key (similar to Contains or Any)

Parameters
keyThe value of the key
Returns
True if the key was found in the list, false otherwise

◆ Intersect< T2 >()

virtual IEnumerable<T2> Sphyrnidae.Common.BinaryList< T, TKey >.Intersect< T2 > ( IEnumerable< T2 >  list,
Func< T2, TKey >  keySelector 
)
virtual

Returns the items from the provided enumeration that match (intersect) on the provided key (Eg. Join where selecting the provided enumeration objects)

Template Parameters
T2Any object type
Parameters
listThe list containing those items which must be contained in the first list
keySelectorThe key selector for the enumeration
Returns
Items from the provided enumeration that match (intersect) on the provided key

◆ NonIntersect< T2 >()

virtual IEnumerable<T2> Sphyrnidae.Common.BinaryList< T, TKey >.NonIntersect< T2 > ( IEnumerable< T2 >  list,
Func< T2, TKey >  keySelector 
)
virtual

Returns the items from the provided enumeration that don't match (intersect) on the provided key (eg. left join where not exists; selecting the provided enumeration objects)

Template Parameters
T2Any object type
Parameters
listThe list containing those items which must not be contained in the first list
keySelectorThe key selector for the enumeration
Returns
Items from the provided enumeration that don't match (intersect) on the provided key

Property Documentation

◆ KeySelector

Func<T, TKey> Sphyrnidae.Common.BinaryList< T, TKey >.KeySelector
getprotected

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