XposeCraft  1.0.1-rc1
Developer API
XposeCraft.Collections.SerializableDictionary3< TKey, TValue > Class Template Reference

Represents a generic collection of key/value pairs. More...

Inheritance diagram for XposeCraft.Collections.SerializableDictionary3< TKey, TValue >:

Classes

struct  Enumerator
 

Public Member Functions

 SerializableDictionary3 ()
 
 SerializableDictionary3 (int capacity)
 
 SerializableDictionary3 (IEqualityComparer< TKey > comparer)
 
 SerializableDictionary3 (int capacity, IEqualityComparer< TKey > comparer)
 
 SerializableDictionary3 (IDictionary< TKey, TValue > dictionary)
 
 SerializableDictionary3 (IDictionary< TKey, TValue > dictionary, IEqualityComparer< TKey > comparer)
 
bool ContainsValue (TValue value)
 
bool ContainsKey (TKey key)
 
void Clear ()
 
void Add (TKey key, TValue value)
 
bool Remove (TKey key)
 
bool TryGetValue (TKey key, out TValue value)
 
void Add (KeyValuePair< TKey, TValue > item)
 
bool Contains (KeyValuePair< TKey, TValue > item)
 
void CopyTo (KeyValuePair< TKey, TValue >[] array, int index)
 
bool Remove (KeyValuePair< TKey, TValue > item)
 
Enumerator GetEnumerator ()
 

Properties

Dictionary< TKey, TValue > AsDictionary [get]
 
int Count [get]
 
TValue this[TKey key, TValue defaultValue] [get]
 
TValue this[TKey key] [get, set]
 
ICollection< TKey > Keys [get]
 
ICollection< TValue > Values [get]
 
bool IsReadOnly [get]
 

Detailed Description

Represents a generic collection of key/value pairs.

Can be used for serialization purposes, which implies that it can be used during a hot-swap in Unity Editor. To use, inherit this generic class to a non-generic version (no need to be public) and annotate [Serializable]. Source: https://forum.unity3d.com/threads/finally-a-serializable-dictionary-for-unity-extracted-from-system-collections-generic.335797/

Template Parameters
TKeyThe type of keys in the dictionary.
TValueThe type of values in the dictionary.

Constructor & Destructor Documentation

◆ SerializableDictionary3() [1/6]

◆ SerializableDictionary3() [2/6]

◆ SerializableDictionary3() [3/6]

XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.SerializableDictionary3 ( IEqualityComparer< TKey >  comparer)

◆ SerializableDictionary3() [4/6]

XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.SerializableDictionary3 ( int  capacity,
IEqualityComparer< TKey >  comparer 
)

◆ SerializableDictionary3() [5/6]

XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.SerializableDictionary3 ( IDictionary< TKey, TValue >  dictionary)

◆ SerializableDictionary3() [6/6]

XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.SerializableDictionary3 ( IDictionary< TKey, TValue >  dictionary,
IEqualityComparer< TKey >  comparer 
)

Member Function Documentation

◆ Add() [1/2]

void XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Add ( TKey  key,
TValue  value 
)

◆ Add() [2/2]

void XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Add ( KeyValuePair< TKey, TValue >  item)

◆ Clear()

void XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Clear ( )

◆ Contains()

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Contains ( KeyValuePair< TKey, TValue >  item)

◆ ContainsKey()

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.ContainsKey ( TKey  key)

◆ ContainsValue()

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.ContainsValue ( TValue  value)

◆ CopyTo()

void XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.CopyTo ( KeyValuePair< TKey, TValue > []  array,
int  index 
)

◆ GetEnumerator()

◆ Remove() [1/2]

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Remove ( TKey  key)

◆ Remove() [2/2]

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Remove ( KeyValuePair< TKey, TValue >  item)

◆ TryGetValue()

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.TryGetValue ( TKey  key,
out TValue  value 
)

Property Documentation

◆ AsDictionary

Dictionary<TKey, TValue> XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.AsDictionary
get

◆ Count

int XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Count
get

◆ IsReadOnly

bool XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.IsReadOnly
get

◆ Keys

ICollection<TKey> XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Keys
get

◆ this[TKey key, TValue defaultValue]

TValue XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.this[TKey key, TValue defaultValue]
get

◆ this[TKey key]

TValue XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.this[TKey key]
getset

◆ Values

ICollection<TValue> XposeCraft.Collections.SerializableDictionary3< TKey, TValue >.Values
get

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