LUSID C# SDK
Public Member Functions | Properties | List of all members
Lusid.Sdk.Client.Multimap< TKey, TValue > Class Template Reference

A dictionary in which one key has many associated values. More...

Inheritance diagram for Lusid.Sdk.Client.Multimap< TKey, TValue >:
Inheritance graph
[legend]

Public Member Functions

 Multimap ()
 Empty Constructor. More...
 
 Multimap (IEqualityComparer< TKey > comparer)
 Constructor with comparer. More...
 
IEnumerator< KeyValuePair< TKey, IList< TValue > > > GetEnumerator ()
 To get the enumerator. More...
 
void Add (KeyValuePair< TKey, IList< TValue >> item)
 Add values to Multimap More...
 
void Add (Multimap< TKey, TValue > multimap)
 Add Multimap to Multimap More...
 
void Clear ()
 Clear Multimap More...
 
bool Contains (KeyValuePair< TKey, IList< TValue >> item)
 Determines whether Multimap contains the specified item. More...
 
void CopyTo (KeyValuePair< TKey, IList< TValue >>[] array, int arrayIndex)
 Copy items of the Multimap to an array, starting at a particular array index. More...
 
bool Remove (KeyValuePair< TKey, IList< TValue >> item)
 Removes the specified item from the Multimap. More...
 
void Add (TKey key, IList< TValue > value)
 Adds an item with the provided key and value to the Multimap. More...
 
bool ContainsKey (TKey key)
 Determines whether the Multimap contains an item with the specified key. More...
 
bool Remove (TKey key)
 Removes item with the specified key from the Multimap. More...
 
bool TryGetValue (TKey key, out IList< TValue > value)
 Gets the value associated with the specified key. More...
 
void CopyTo (Array array, int index)
 Copy the items of the Multimap to an System.Array, starting at a particular System.Array index. More...
 
void Add (TKey key, TValue value)
 Adds an item with the provided key and value to the Multimap. More...
 

Properties

int Count [get]
 Gets the number of items contained in the Multimap. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the Multimap is read-only. More...
 
IList< TValue > this[TKey key] [get, set]
 Gets or sets the item with the specified key. More...
 
ICollection< TKey > Keys [get]
 Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. More...
 
ICollection< IList< TValue > > Values [get]
 Gets a System.Collections.Generic.ICollection containing the values of the Multimap. More...
 

Detailed Description

A dictionary in which one key has many associated values.

Template Parameters
TKeyThe type of the key
TValueThe type of the value associated with the key.

Constructor & Destructor Documentation

◆ Multimap() [1/2]

Lusid.Sdk.Client.Multimap< TKey, TValue >.Multimap ( )
inline

Empty Constructor.

◆ Multimap() [2/2]

Lusid.Sdk.Client.Multimap< TKey, TValue >.Multimap ( IEqualityComparer< TKey >  comparer)
inline

Constructor with comparer.

Parameters
comparer

Member Function Documentation

◆ Add() [1/4]

void Lusid.Sdk.Client.Multimap< TKey, TValue >.Add ( KeyValuePair< TKey, IList< TValue >>  item)
inline

Add values to Multimap

Parameters
itemKey value pair

◆ Add() [2/4]

void Lusid.Sdk.Client.Multimap< TKey, TValue >.Add ( Multimap< TKey, TValue >  multimap)
inline

Add Multimap to Multimap

Parameters
multimapMultimap

◆ Add() [3/4]

void Lusid.Sdk.Client.Multimap< TKey, TValue >.Add ( TKey  key,
IList< TValue >  value 
)
inline

Adds an item with the provided key and value to the Multimap.

Parameters
keyThe object to use as the key of the item to add.
valueThe object to use as the value of the item to add.
Exceptions
InvalidOperationExceptionThrown when couldn't add the value to Multimap.

◆ Add() [4/4]

void Lusid.Sdk.Client.Multimap< TKey, TValue >.Add ( TKey  key,
TValue  value 
)
inline

Adds an item with the provided key and value to the Multimap.

Parameters
keyThe object to use as the key of the item to add.
valueThe object to use as the value of the item to add.
Exceptions
InvalidOperationExceptionThrown when couldn't add value to Multimap.

◆ Clear()

void Lusid.Sdk.Client.Multimap< TKey, TValue >.Clear ( )
inline

Clear Multimap

◆ Contains()

bool Lusid.Sdk.Client.Multimap< TKey, TValue >.Contains ( KeyValuePair< TKey, IList< TValue >>  item)
inline

Determines whether Multimap contains the specified item.

Parameters
itemKey value pair
Exceptions
NotImplementedExceptionMethod needs to be implemented
Returns
true if the Multimap contains the item; otherwise, false.

◆ ContainsKey()

bool Lusid.Sdk.Client.Multimap< TKey, TValue >.ContainsKey ( TKey  key)
inline

Determines whether the Multimap contains an item with the specified key.

Parameters
keyThe key to locate in the Multimap.
Returns
true if the Multimap contains an item with the key; otherwise, false.

◆ CopyTo() [1/2]

void Lusid.Sdk.Client.Multimap< TKey, TValue >.CopyTo ( Array  array,
int  index 
)
inline

Copy the items of the Multimap to an System.Array, starting at a particular System.Array index.

Parameters
arrayThe one-dimensional System.Array that is the destination of the items copied from Multimap. The System.Array must have zero-based indexing.
indexThe zero-based index in array at which copying begins.

◆ CopyTo() [2/2]

void Lusid.Sdk.Client.Multimap< TKey, TValue >.CopyTo ( KeyValuePair< TKey, IList< TValue >>[]  array,
int  arrayIndex 
)
inline

Copy items of the Multimap to an array, starting at a particular array index.

Parameters
arrayThe array that is the destination of the items copied from Multimap. The array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.
Exceptions
NotImplementedExceptionMethod needs to be implemented

◆ GetEnumerator()

IEnumerator<KeyValuePair<TKey, IList<TValue> > > Lusid.Sdk.Client.Multimap< TKey, TValue >.GetEnumerator ( )
inline

To get the enumerator.

Returns
Enumerator

◆ Remove() [1/2]

bool Lusid.Sdk.Client.Multimap< TKey, TValue >.Remove ( KeyValuePair< TKey, IList< TValue >>  item)
inline

Removes the specified item from the Multimap.

Parameters
itemKey value pair
Returns
true if the item is successfully removed; otherwise, false.
Exceptions
NotImplementedExceptionMethod needs to be implemented

◆ Remove() [2/2]

bool Lusid.Sdk.Client.Multimap< TKey, TValue >.Remove ( TKey  key)
inline

Removes item with the specified key from the Multimap.

Parameters
keyThe key to locate in the Multimap.
Returns
true if the item is successfully removed; otherwise, false.

◆ TryGetValue()

bool Lusid.Sdk.Client.Multimap< TKey, TValue >.TryGetValue ( TKey  key,
out IList< TValue >  value 
)
inline

Gets the value associated with the specified key.

Parameters
keyThe key whose value to get.
valueWhen this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Returns
true if the object that implements Multimap contains an item with the specified key; otherwise, false.

Property Documentation

◆ Count

int Lusid.Sdk.Client.Multimap< TKey, TValue >.Count
get

Gets the number of items contained in the Multimap.

◆ IsReadOnly

bool Lusid.Sdk.Client.Multimap< TKey, TValue >.IsReadOnly
get

Gets a value indicating whether the Multimap is read-only.

◆ Keys

ICollection<TKey> Lusid.Sdk.Client.Multimap< TKey, TValue >.Keys
get

Gets a System.Collections.Generic.ICollection containing the keys of the Multimap.

◆ this[TKey key]

IList<TValue> Lusid.Sdk.Client.Multimap< TKey, TValue >.this[TKey key]
getset

Gets or sets the item with the specified key.

Parameters
keyThe key of the item to get or set.
Returns
The value of the specified key.

◆ Values

ICollection<IList<TValue> > Lusid.Sdk.Client.Multimap< TKey, TValue >.Values
get

Gets a System.Collections.Generic.ICollection containing the values of the Multimap.


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