Show / Hide Table of Contents

# Class Map

A ordered map of String to Value for serialization by an IConfigProvider. Use Map() or From(IDictionary<String, Value>) to create.

##### Inheritance

Object
Value
Map

##### Implements

IDictionary<String, Value>
ICollection<KeyValuePair<String, Value>>
IEnumerable<KeyValuePair<String, Value>>
IEnumerable

##### Inherited Members

Value.Null()
Value.List()
Value.Map()
Value.From(String)
Value.Text(String)
Value.From(Int64)
Value.Integer(Int64)
Value.From(Decimal)
Value.Float(Decimal)
Value.From(Boolean)
Value.Bool(Boolean)
Value.From(IEnumerable<Value>)
Value.From(IDictionary<String, Value>)
Value.From(IEnumerable<KeyValuePair<String, Value>>)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

###### Namespace: IPA.Config.Data

###### Assembly: IPA.Loader.dll

##### Syntax

    public sealed class Map : Value, IDictionary<string, Value>, ICollection<KeyValuePair<string, Value>>, IEnumerable<KeyValuePair<string, Value>>, IEnumerable

### Properties

| Improve this Doc View Source

#### Count

Gets the number of key-value pairs in this Map.

##### Declaration

    public int Count { get; }

##### Property Value

Type | Description
--- | ---
Int32 |

##### See Also

Count
| Improve this Doc View Source

#### Item[String]

Accesses the Value at `key` in the map.

##### Declaration

    public Value this[string key] { get; set; }

##### Parameters

Type | Name | Description
--- | --- | ---
String | key | the key to get the value associated with

##### Property Value

Type | Description
--- | ---
Value | the value associated with the `key`

##### See Also

Item[TKey]
| Improve this Doc View Source

#### Keys

Gets a collection of the keys for the Map.

##### Declaration

    public ICollection<string> Keys { get; }

##### Property Value

Type | Description
--- | ---
ICollection<String> |

##### See Also

Keys
| Improve this Doc View Source

#### Values

Gets a collection of the values in the Map.

##### Declaration

    public ICollection<Value> Values { get; }

##### Property Value

Type | Description
--- | ---
ICollection<Value> |

##### Remarks

Unlike all other iterables given by Map, this does not guarantee that order is maintained.

##### See Also

Values

### Methods

| Improve this Doc View Source

#### Add(String, Value)

Adds a new Value with a given key.

##### Declaration

    public void Add(string key, Value value)

##### Parameters

Type | Name | Description
--- | --- | ---
String | key | the key to put the value at
Value | value | the Value to add

##### See Also

Add(TKey, TValue)
| Improve this Doc View Source

#### Clear()

Clears the Map of its key-value pairs.

##### Declaration

    public void Clear()

##### See Also

Clear()
| Improve this Doc View Source

#### ContainsKey(String)

Checks if the Map contains a given `key`.

##### Declaration

    public bool ContainsKey(string key)

##### Parameters

Type | Name | Description
--- | --- | ---
String | key | the key to check for

##### Returns

Type | Description
--- | ---
Boolean | true if the key exists, otherwise false

##### See Also

ContainsKey(TKey)
| Improve this Doc View Source

#### GetEnumerator()

Enumerates the Map's key-value pairs.

##### Declaration

    public IEnumerator<KeyValuePair<string, Value>> GetEnumerator()

##### Returns

Type | Description
--- | ---
IEnumerator<KeyValuePair<String, Value>> | an IEnumerator<T> of key-value pairs in this Map

##### See Also

GetEnumerator()
| Improve this Doc View Source

#### Remove(String)

Removes the object associated with a key in this Map.

##### Declaration

    public bool Remove(string key)

##### Parameters

Type | Name | Description
--- | --- | ---
String | key | the key to remove

##### Returns

Type | Description
--- | ---
Boolean | true if the key existed, false otherwise

##### See Also

Remove(TKey)
| Improve this Doc View Source

#### ToString()

Converts this Value into a human-readable format.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
String | a JSON-like set of key-value pairs

##### Overrides

Value.ToString()
| Improve this Doc View Source

#### TryGetValue(String, out Value)

Gets the value associated with the specified key.

##### Declaration

    public bool TryGetValue(string key, out Value value)

##### Parameters

Type | Name | Description
--- | --- | ---
String | key | the key of the value to get
Value | value | the target location of the retrieved object

##### Returns

Type | Description
--- | ---
Boolean | true if the key was found and `value` set, false otherwise

##### See Also

TryGetValue(TKey, TValue)

### Explicit Interface Implementations

| Improve this Doc View Source

#### ICollection<KeyValuePair<String, Value>>.Add(KeyValuePair<String, Value>)

##### Declaration

    void ICollection<KeyValuePair<string, Value>>.Add(KeyValuePair<string, Value> item)

##### Parameters

Type | Name | Description
--- | --- | ---
KeyValuePair<String, Value> | item |

| Improve this Doc View Source

#### ICollection<KeyValuePair<String, Value>>.Contains(KeyValuePair<String, Value>)

##### Declaration

    bool ICollection<KeyValuePair<string, Value>>.Contains(KeyValuePair<string, Value> item)

##### Parameters

Type | Name | Description
--- | --- | ---
KeyValuePair<String, Value> | item |

##### Returns

Type | Description
--- | ---
Boolean |

| Improve this Doc View Source

#### ICollection<KeyValuePair<String, Value>>.CopyTo(KeyValuePair<String, Value>[], Int32)

##### Declaration

    void ICollection<KeyValuePair<string, Value>>.CopyTo(KeyValuePair<string, Value>[] array, int arrayIndex)

##### Parameters

Type | Name | Description
--- | --- | ---
KeyValuePair<String, Value>[] | array |
Int32 | arrayIndex |

| Improve this Doc View Source

#### ICollection<KeyValuePair<String, Value>>.IsReadOnly

##### Declaration

    bool ICollection<KeyValuePair<string, Value>>.IsReadOnly { get; }

##### Returns

Type | Description
--- | ---
Boolean |

| Improve this Doc View Source

#### ICollection<KeyValuePair<String, Value>>.Remove(KeyValuePair<String, Value>)

##### Declaration

    bool ICollection<KeyValuePair<string, Value>>.Remove(KeyValuePair<string, Value> item)

##### Parameters

Type | Name | Description
--- | --- | ---
KeyValuePair<String, Value> | item |

##### Returns

Type | Description
--- | ---
Boolean |

| Improve this Doc View Source

#### IEnumerable.GetEnumerator()

##### Declaration

    IEnumerator IEnumerable.GetEnumerator()

##### Returns

Type | Description
--- | ---
IEnumerator |

### Implements

System.Collections.Generic.IDictionary<TKey,TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

### Extension Methods

EnumerableExtensions.Prepend<T>(IEnumerable<T>, T)
ReflectionUtil.SetField(Object, String, Object)
ReflectionUtil.SetField<T>(T, String, Object)
ReflectionUtil.GetField<T>(Object, String)
ReflectionUtil.SetProperty(Object, String, Object)
ReflectionUtil.SetProperty<T>(T, String, Object)
ReflectionUtil.InvokeMethod(Object, String, Object[])
ReflectionUtil.InvokeMethod<T>(T, String, Object[])
ReflectionUtil.InvokeMethod<T>(Object, String, Object[])
ReflectionUtil.InvokeMethod<T, U>(U, String, Object[])