private static IConfigProperty <T> GetOrAddProperty <T>([NotNull] IConfigPropertyBase property) { if (ConfigPropertyObserver.GetOrAddProperty(property) is IConfigProperty <T> result) { return(result); } throw new ArgumentException(@$ "Config already contains another property with same path '{property.Path}' and different generic type.", nameof(property)); }
public static void RemoveProperty(IConfigPropertyBase property) { if (!ConfigDictionary.TryGetValue(property.Config, out IndexDictionary <String, IConfigPropertyBase> dictionary)) { return; } dictionary.Remove(property.Path); ClearProperty(property); }
private static void ReadProperty(IConfigPropertyBase property) { property.Read(); }
private static IConfigPropertyBase GetOrAddProperty(IConfigPropertyBase property) { return(ConfigDictionary.GetOrAdd(property.Config, new IndexDictionary <String, IConfigPropertyBase>()) .GetOrAdd(property.Path, property)); }
public void RemoveValue(IConfigPropertyBase property) { RemoveValue(property.Key, property.Sections); }
public Boolean KeyExist(IConfigPropertyBase property) { return(KeyExist(property.Key, property.Sections)); }
private static void ClearProperty(IConfigPropertyBase property) { property.Dispose(true); }
private static void ResetProperty(IConfigPropertyBase property) { property.Reset(); }
private static void SaveProperty(IConfigPropertyBase property) { property.Save(); }