51Degrees Pipeline .NET  4.1

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist Class Reference

Detailed Description

This evidence filter will only include keys that are on a whitelist that is specified at construction time.

Inheritance diagram for FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist:

[legend]

Public Member Functions

 EvidenceKeyFilterWhitelist (List< string > whitelist)
Constructor The filter will be case-insensitive. More...
 EvidenceKeyFilterWhitelist (List< string > whitelist, IEqualityComparer< string > comparer)
Constructor More...
 EvidenceKeyFilterWhitelist (Dictionary< string, int > whitelist)
Constructor The filter will be case-insensitive. More...
 EvidenceKeyFilterWhitelist (Dictionary< string, int > whitelist, IEqualityComparer< string > comparer)
Constructor More...
virtual bool  Include (string key)
Check if the specified evidence key is included by this filter. More...
virtual ? int  Order (string key)
Get the order of precedence of the specified key More...

Public Attributes

IEqualityComparer< string >  Comparer => _comparer
Get the equality comparer that is used to determine if a supplied string key is in the whitelist or not. More...

Protected Attributes

Dictionary< string, int >  _whitelist
The dictionary containing all keys in the whitelist and the order of precedence. More...
IEqualityComparer< string >  _comparer
The equality comparer that is used to determine if a supplied string key is in the whitelist or not. More...

Properties

IReadOnlyDictionary< string, int >  Whitelist [get]
Get the keys in the white list as a read only dictionary. More...

Constructor & Destructor Documentation

◆ EvidenceKeyFilterWhitelist() [1/4]

FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist.EvidenceKeyFilterWhitelist ( List< string >   whitelist )

Constructor The filter will be case-insensitive.

For a case-sensitive filter use the overload that takes an IEqualityComparer<T>.

Parameters
whitelist - The list of evidence keys that is filter will include. By default, all keys will have the same order of precedence.

◆ EvidenceKeyFilterWhitelist() [2/4]

FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist.EvidenceKeyFilterWhitelist ( List< string >   whitelist,
IEqualityComparer< string >   comparer  
)

Constructor

Parameters
whitelist - The list of evidence keys that is filter will include. By default, all keys will have the same order of precedence.
comparer - Comparator to use when comparing the keys.

◆ EvidenceKeyFilterWhitelist() [3/4]

FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist.EvidenceKeyFilterWhitelist ( Dictionary< string, int >   whitelist )

Constructor The filter will be case-insensitive.

For a case-sensitive filter use the overload that takes an IEqualityComparer<T>.

Parameters
whitelist - The dictionary of evidence keys that is filter will include. The order of precedence of each key is given by the value of the key/value pair.

◆ EvidenceKeyFilterWhitelist() [4/4]

FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist.EvidenceKeyFilterWhitelist ( Dictionary< string, int >   whitelist,
IEqualityComparer< string >   comparer  
)

Constructor

Parameters
whitelist - The dictionary of evidence keys that is filter will include. The order of precedence of each key is given by the value of the key/value pair.
comparer - Comparator to use when comparing the keys.

Member Function Documentation

Member Data Documentation

◆ _comparer

IEqualityComparer<string> FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist._comparer
protected
Initial value:
=
StringComparer.OrdinalIgnoreCase

The equality comparer that is used to determine if a supplied string key is in the whitelist or not.

By default, a case insensitive comparison is used.

◆ _whitelist

Dictionary<string, int> FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist._whitelist
protected

The dictionary containing all keys in the whitelist and the order of precedence.

◆ Comparer

IEqualityComparer<string> FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist.Comparer => _comparer

Get the equality comparer that is used to determine if a supplied string key is in the whitelist or not.

Property Documentation

◆ Whitelist

IReadOnlyDictionary<string, int> FiftyOne.Pipeline.Core.Data.EvidenceKeyFilterWhitelist.Whitelist
get

Get the keys in the white list as a read only dictionary.