-
-
Notifications
You must be signed in to change notification settings - Fork 0
PseudoSerializableDictionary
Namespace: Lowry.Utils.CodeExtensions
public sealed class PseudoSerializableDictionary<TKey, TValue>InputLayers makes use of a serializable "dictionary", which consists instead of a List of keys and a List of values kept in sync.
This "dictionary" functions a lot like a typical C# Dictionary🔗.
public List<TKey> Keys { get {...}, set {...} }Stores the
TKeykeys of the dictionary.
public List<TValue> Values { get {...}, set {...} }Stores the
TValuevalues of the dictionary.
public int Count { get {...} }Returns: the number of elements currently in the dictionary.
public void Set (TKey key, TValue value) {...}Assigns a
valueto a specifickeyin the dictionary.
public void Set (KeyValuePair<TKey, TValue> pair) {...}Adds a
KeyValuePairdirecly to the dictionary.
public void Set (TKey key, TValue value) {...}Removes the entry at a specific
keyfrom the dictionary.Returns:
trueif thekeywas found and removed.
public void Set (KeyValuePair<TKey, TValue> pair) {...}Removes the entry at a specific
KeyValuePair'skeyfrom the dictionary.Returns:
trueif theKeyValuePair'skeywas found and removed.
public void RemoveAt (int id) {...}Removes the entry at a specific
idin the dictionary.Returns:
trueif theidwas found and removed.
public void Contains (TKey key) {...}Returns:
trueif thekeywas found in the dictionary.
public void Contains (KeyValuePair<TKey, TValue> pair) {...}Returns:
trueif theKeyValuePair'skeywas found in the dictionary.
public void Clear () {...}Clears the contents of the dictionary.
public TValue At (int id) {...}Returns: the
TValuefound at the positionidin dictionary ordefaultif the id is ut of bounds.
public TValue At (TKey key) {...}Returns: the
TValuecorresponding to theTKeyin dictionary or throws anArgumentOutOfRangeExceptionif theTKeycannot be found in the dictionary.
👉🏻 Download InputLayers on the Unity Asset Store!