\r\n

51Degrees Pipeline .NET  4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap Interface Reference

Detailed Description

Represents a collection that stores data of multiple different types.

Data is accessed using an ITypedKey<T> that specifies the unique 'name' to store the data under and the type of the data being stored.

Inheritance diagram for FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap:

[legend]

Public Member Functions

void  Add< T > (ITypedKey< T > key, T data)
Add the specified data to the collection using the specified key. More...
T  Get< T > (ITypedKey< T > key)
Get the data associated with the specified key. More...
T  Get< T > ()
Get the data associated with the specified type. More...
ICollection< string >  GetKeys ()
Return string values of the keys in the map. More...
IDictionary< string, object >  AsStringKeyDictionary ()
Return the entire collection as a IDictionary<TKey, TValue> object. More...
bool  TryGetValue< T > (ITypedKey< T > key, out T value)
Check if the map contains an item with the specified key name and type. More...

Member Function Documentation

◆ Add< T >()

void FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap.Add< T > ( ITypedKey< T >   key,
T   data  
)

Add the specified data to the collection using the specified key.

Template Parameters
T - The type of the data being stored.
Parameters
key - The key used to identify the data.
data - The data to store.

Implemented in FiftyOne.Pipeline.Core.TypedMap.TypedKeyMap.

◆ AsStringKeyDictionary()

IDictionary<string, object> FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap.AsStringKeyDictionary ( )

Return the entire collection as a IDictionary<TKey, TValue> object.

Note that this is the actual internal dictionary instance so any changes to it will be reflected in the ITypedKeyMap object.

Returns
The data as a IDictionary<TKey, TValue>.

Implemented in FiftyOne.Pipeline.Core.TypedMap.TypedKeyMap.

◆ Get< T >() [1/2]

T FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap.Get< T > ( ITypedKey< T >   key )

Get the data associated with the specified key.

Template Parameters
T - The type of the data to return.
Parameters
key - The key used to access the data.
Returns
The data.

Implemented in FiftyOne.Pipeline.Core.TypedMap.TypedKeyMap.

◆ Get< T >() [2/2]

T FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap.Get< T > ( )

Get the data associated with the specified type.

Template Parameters
T - The type of the data to return.
Returns
The data.

Implemented in FiftyOne.Pipeline.Core.TypedMap.TypedKeyMap.

◆ TryGetValue< T >()

bool FiftyOne.Pipeline.Core.TypedMap.ITypedKeyMap.TryGetValue< T > ( ITypedKey< T >   key,
out T   value  
)

Check if the map contains an item with the specified key name and type.

If it does exist, retrieve it.

Parameters
key - The key to check for.
value - The value associated with the key.
Returns
True if an entry matching the key exists in the map. False otherwise.

Implemented in FiftyOne.Pipeline.Core.TypedMap.TypedKeyMap.