KS.Reactor.ksConstMap< Key, Value > Class Template Reference

Wraps a dictionary and provides read-only access to it. More...

Inheritance diagram for KS.Reactor.ksConstMap< Key, Value >:

Public Member Functions

 ksConstMap (Dictionary< Key, Value > map)
 Constructor. More...
 
bool Contains (Key key)
 Checks if a key is in the map. More...
 
bool TryGetValue (Key key, out Value value)
 Tries to get a value from the map. More...
 
IEnumerator< KeyValuePair< Key, Value > > GetEnumerator ()
 Gets the enumerator for the map. More...
 

Properties

int Count [get]
 Number of entries in the map. More...
 
Value this[Key key] [get]
 Gets a value from the map. More...
 

Detailed Description

Wraps a dictionary and provides read-only access to it.

Template Parameters
Key
Value

Constructor & Destructor Documentation

◆ ksConstMap()

KS.Reactor.ksConstMap< Key, Value >.ksConstMap ( Dictionary< Key, Value >  map)

Constructor.

Parameters
map

Member Function Documentation

◆ Contains()

bool KS.Reactor.ksConstMap< Key, Value >.Contains ( Key  key)

Checks if a key is in the map.

Parameters
keyKey to check.
Returns
True if the key is in the map.

◆ GetEnumerator()

IEnumerator<KeyValuePair<Key, Value> > KS.Reactor.ksConstMap< Key, Value >.GetEnumerator ( )

Gets the enumerator for the map.

Returns
Enumerator for the map.

◆ TryGetValue()

bool KS.Reactor.ksConstMap< Key, Value >.TryGetValue ( Key  key,
out Value  value 
)

Tries to get a value from the map.

Parameters
keyKey to get value for.
valueValue for the key.
Returns
True if the key was found.

Property Documentation

◆ Count

int KS.Reactor.ksConstMap< Key, Value >.Count
get

Number of entries in the map.

◆ this[Key key]

Value KS.Reactor.ksConstMap< Key, Value >.this[Key key]
get

Gets a value from the map.

Parameters
key
Returns