Table of Contents

Class NamedValueDictionary<T>

Namespace
Microsoft.Xna.Framework.Content.Pipeline
Assembly
MonoGame.Framework.Content.Pipeline.dll
public class NamedValueDictionary<T> : IDictionary<string, T>, ICollection<KeyValuePair<string, T>>, IEnumerable<KeyValuePair<string, T>>, IEnumerable

Type Parameters

T
Inheritance
NamedValueDictionary<T>
Implements
Derived
Inherited Members

Constructors

NamedValueDictionary()

Initializes an instance of NamedValueDictionary.

public NamedValueDictionary()

Properties

Count

Gets the number of items in the dictionary.

public int Count { get; }

Property Value

int

DefaultSerializerType

Specifies the type hint for the intermediate serializer. Values of this type do not store an explicit type attribute in the related XML source.

protected virtual Type DefaultSerializerType { get; }

Property Value

Type

this[string]

Gets or sets the specified item.

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

Parameters

key string

Identity of a key.

Property Value

T

Keys

Gets all keys contained in the dictionary.

public ICollection<string> Keys { get; }

Property Value

ICollection<string>

Values

Gets all values contained in the dictionary.

public ICollection<T> Values { get; }

Property Value

ICollection<T>

Methods

Add(string, T)

Adds the specified key and value to the dictionary.

public void Add(string key, T value)

Parameters

key string

Identity of the key of the new data pair.

value T

The value of the new data pair.

AddItem(string, T)

Adds an element to the dictionary.

protected virtual void AddItem(string key, T value)

Parameters

key string

Identity of the key of the new element.

value T

The value of the new element.

Clear()

Removes all keys and values from the dictionary.

public void Clear()

ClearItems()

Removes all elements from the dictionary.

protected virtual void ClearItems()

ContainsKey(string)

Determines whether the specified key is present in the dictionary.

public bool ContainsKey(string key)

Parameters

key string

Identity of a key.

Returns

bool

GetEnumerator()

Gets an enumerator that iterates through items in a dictionary.

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

Returns

IEnumerator<KeyValuePair<string, T>>

Enumerator for iterating through the dictionary.

Remove(string)

Removes the specified key and value from the dictionary.

public bool Remove(string key)

Parameters

key string

Identity of the key to be removed.

Returns

bool

true if the value is present; false otherwise.

RemoveItem(string)

Removes the specified element from the dictionary.

protected virtual bool RemoveItem(string key)

Parameters

key string

Identity of the key of the data pair to be removed.

Returns

bool

true if the value is present; false otherwise.

SetItem(string, T)

Modifies the value of an existing element.

protected virtual void SetItem(string key, T value)

Parameters

key string

Identity of the element to be modified.

value T

The value to be set.

TryGetValue(string, out T)

Gets the value associated with the specified key.

public bool TryGetValue(string key, out T value)

Parameters

key string

Identity of the key of the element whose value is to be retrieved.

value T

The current value of the element.

Returns

bool

true if the value is present; false otherwise.