/// <summary> /// Create HandyDictionary without auto-generating value function. /// </summary> /// <param name="disposeValue">method of disposing a value</param> public HandyDictionary(DisposeValue disposeValue = null) { defaultValue = default; if (disposeValue != null) { this.disposeValue = disposeValue; } }
/// <summary> /// Create HandyDictionary with auto-generating value function. /// </summary> /// <param name="getValue">method of creating an object for a key</param> /// <param name="disposeValue">method of disposing a value</param> public HandyDictionary(GetValue getValue, DisposeValue disposeValue = null) { this.getValue = getValue; if (disposeValue != null) { this.disposeValue = disposeValue; } }