Class InitializationUtils
- Namespace
- ElectricDrill.SoapRpgFramework.Utils
- Assembly
- com.electricdrill.soap-rpg-framework.Runtime.dll
Provides utility methods for initializing and refreshing collections during object setup. Contains helper methods commonly used during component initialization and validation.
public static class InitializationUtils
- Inheritance
-
objectInitializationUtils
Methods
RefreshInspectorReservedValues<TKey, TValue>(ref List<SerKeyValPair<TKey, TValue>>, IEnumerable<TKey>)
Refreshes a list of key-value pairs to match a provided set of keys, preserving existing values where possible. This method ensures that the inspector-reserved values list contains exactly the keys specified, maintaining any previously assigned values and setting defaults for new keys.
public static void RefreshInspectorReservedValues<TKey, TValue>(ref List<SerKeyValPair<TKey, TValue>> inspectorReservedValues, IEnumerable<TKey> keys)
Parameters
inspectorReservedValuesList<SerKeyValPair<TKey, TValue>>The list to refresh (passed by reference)
keysIEnumerable<TKey>The collection of keys that should be present in the list
Type Parameters
TKeyThe type of the keys
TValueThe type of the values