Class DictionaryFN
Inheritance
System.Object
DictionaryFN
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GameKit.Dependencies.Utilities
Assembly: GameKit.Dependencies.dll
Syntax
public static class DictionaryFN
Methods
KeysToList<TKey, TValue>(IDictionary<TKey, TValue>)
Returns keys as an allocated list.
Declaration
public static List<TKey> KeysToList<TKey, TValue>(this IDictionary<TKey, TValue> dict)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TKey, TValue> | dict |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TKey> |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
KeysToList<TKey, TValue>(IDictionary<TKey, TValue>, ref List<TKey>)
Returns keys as a list using the supplied collection as-is.
Declaration
public static List<TKey> KeysToList<TKey, TValue>(this IDictionary<TKey, TValue> dict, ref List<TKey> result)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TKey, TValue> | dict | |
System.Collections.Generic.List<TKey> | result |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TKey> |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
TryGetValueIL2CPP<TKey, TValue>(IDictionary<TKey, TValue>, TKey, out TValue)
Uses a hacky way to TryGetValue on a dictionary when using IL2CPP and on mobile. This is to support older devices that don't properly handle IL2CPP builds.
Declaration
public static bool TryGetValueIL2CPP<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, out TValue value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TKey, TValue> | dict | |
TKey | key | |
TValue | value |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
ValuesToList<TKey, TValue>(IDictionary<TKey, TValue>)
Returns values as an allocated list.
Declaration
public static List<TValue> ValuesToList<TKey, TValue>(this IDictionary<TKey, TValue> dict)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TKey, TValue> | dict |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TValue> |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
ValuesToList<TKey, TValue>(IDictionary<TKey, TValue>, ref List<TValue>)
Returns values as a list using the supplied collection as-is.
Declaration
public static void ValuesToList<TKey, TValue>(this IDictionary<TKey, TValue> dict, ref List<TValue> result)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TKey, TValue> | dict | |
System.Collections.Generic.List<TValue> | result |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |