Search Results for

    Show / Hide Table of Contents

    Class Multimap<TKey, TValue>

    A dictionary in which one key has many associated values.

    Inheritance
    object
    Multimap<TKey, TValue>
    Implements
    IDictionary<TKey, IList<TValue>>
    System.Collections.Generic.ICollection<T><KeyValuePair<TKey, IList<TValue>>>
    IEnumerable<KeyValuePair<TKey, IList<TValue>>>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: mailslurp.Client
    Assembly: mailslurp.dll
    Syntax
    public class Multimap<TKey, TValue> : IDictionary<TKey, IList<TValue>>, ICollection<KeyValuePair<TKey, IList<TValue>>>, IEnumerable<KeyValuePair<TKey, IList<TValue>>>, IEnumerable
    Type Parameters
    Name Description
    TKey

    The type of the key

    TValue

    The type of the value associated with the key.

    Constructors

    View Source

    Multimap()

    Empty Constructor.

    Declaration
    public Multimap()
    View Source

    Multimap(IEqualityComparer<TKey>)

    Constructor with comparer.

    Declaration
    public Multimap(IEqualityComparer<TKey> comparer)
    Parameters
    Type Name Description
    IEqualityComparer<TKey> comparer

    Properties

    View Source

    Count

    Gets the number of items contained in the Multimap.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    View Source

    IsReadOnly

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

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool
    View Source

    this[TKey]

    Gets or sets the item with the specified key.

    Declaration
    public IList<TValue> this[TKey key] { get; set; }
    Parameters
    Type Name Description
    TKey key

    The key of the item to get or set.

    Property Value
    Type Description
    IList<TValue>

    The value of the specified key.

    View Source

    Keys

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

    Declaration
    public ICollection<TKey> Keys { get; }
    Property Value
    Type Description
    System.Collections.Generic.ICollection<T><TKey>
    View Source

    Values

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

    Declaration
    public ICollection<IList<TValue>> Values { get; }
    Property Value
    Type Description
    System.Collections.Generic.ICollection<T><IList<TValue>>

    Methods

    View Source

    Add(TKey, TValue)

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

    Declaration
    public void Add(TKey key, TValue value)
    Parameters
    Type Name Description
    TKey key

    The object to use as the key of the item to add.

    TValue value

    The object to use as the value of the item to add.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when couldn't add value to Multimap.

    View Source

    Add(TKey, IList<TValue>)

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

    Declaration
    public void Add(TKey key, IList<TValue> value)
    Parameters
    Type Name Description
    TKey key

    The object to use as the key of the item to add.

    IList<TValue> value

    The object to use as the value of the item to add.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when couldn't add the value to Multimap.

    View Source

    Add(Multimap<TKey, TValue>)

    Add Multimap to Multimap

    Declaration
    public void Add(Multimap<TKey, TValue> multimap)
    Parameters
    Type Name Description
    Multimap<TKey, TValue> multimap

    Multimap

    View Source

    Add(KeyValuePair<TKey, IList<TValue>>)

    Add values to Multimap

    Declaration
    public void Add(KeyValuePair<TKey, IList<TValue>> item)
    Parameters
    Type Name Description
    KeyValuePair<TKey, IList<TValue>> item

    Key value pair

    View Source

    Clear()

    Clear Multimap

    Declaration
    public void Clear()
    View Source

    Contains(KeyValuePair<TKey, IList<TValue>>)

    Determines whether Multimap contains the specified item.

    Declaration
    public bool Contains(KeyValuePair<TKey, IList<TValue>> item)
    Parameters
    Type Name Description
    KeyValuePair<TKey, IList<TValue>> item

    Key value pair

    Returns
    Type Description
    bool

    true if the Multimap contains the item; otherwise, false.

    Exceptions
    Type Condition
    NotImplementedException

    Method needs to be implemented

    View Source

    ContainsKey(TKey)

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

    Declaration
    public bool ContainsKey(TKey key)
    Parameters
    Type Name Description
    TKey key

    The key to locate in the Multimap.

    Returns
    Type Description
    bool

    true if the Multimap contains an item with the key; otherwise, false.

    View Source

    CopyTo(Array, int)

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

    Declaration
    public void CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array

    The one-dimensional System.Array that is the destination of the items copied from Multimap. The System.Array must have zero-based indexing.

    int index

    The zero-based index in array at which copying begins.

    View Source

    CopyTo(KeyValuePair<TKey, IList<TValue>>[], int)

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

    Declaration
    public void CopyTo(KeyValuePair<TKey, IList<TValue>>[] array, int arrayIndex)
    Parameters
    Type Name Description
    KeyValuePair<TKey, IList<TValue>>[] array

    The array that is the destination of the items copied from Multimap. The array must have zero-based indexing.

    int arrayIndex

    The zero-based index in array at which copying begins.

    Exceptions
    Type Condition
    NotImplementedException

    Method needs to be implemented

    View Source

    GetEnumerator()

    To get the enumerator.

    Declaration
    public IEnumerator<KeyValuePair<TKey, IList<TValue>>> GetEnumerator()
    Returns
    Type Description
    IEnumerator<KeyValuePair<TKey, IList<TValue>>>

    Enumerator

    View Source

    Remove(TKey)

    Removes item with the specified key from the Multimap.

    Declaration
    public bool Remove(TKey key)
    Parameters
    Type Name Description
    TKey key

    The key to locate in the Multimap.

    Returns
    Type Description
    bool

    true if the item is successfully removed; otherwise, false.

    View Source

    Remove(KeyValuePair<TKey, IList<TValue>>)

    Removes the specified item from the Multimap.

    Declaration
    public bool Remove(KeyValuePair<TKey, IList<TValue>> item)
    Parameters
    Type Name Description
    KeyValuePair<TKey, IList<TValue>> item

    Key value pair

    Returns
    Type Description
    bool

    true if the item is successfully removed; otherwise, false.

    Exceptions
    Type Condition
    NotImplementedException

    Method needs to be implemented

    View Source

    TryGetValue(TKey, out IList<TValue>)

    Gets the value associated with the specified key.

    Declaration
    public bool TryGetValue(TKey key, out IList<TValue> value)
    Parameters
    Type Name Description
    TKey key

    The key whose value to get.

    IList<TValue> value

    When 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
    Type Description
    bool

    true if the object that implements Multimap contains an item with the specified key; otherwise, false.

    Implements

    System.Collections.Generic.IDictionary<TKey,TValue>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.