qol: remove this
This commit is contained in:
@@ -28,17 +28,17 @@ namespace Disco.Data.Configuration
|
||||
{
|
||||
get
|
||||
{
|
||||
return ConfigurationCache.GetScopeKeys(Database, this.Scope);
|
||||
return ConfigurationCache.GetScopeKeys(Database, Scope);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetValue<T>(string Key, T Value)
|
||||
{
|
||||
ConfigurationCache.Helpers<T>.SetValue(Database, this.Scope, Key, Value);
|
||||
ConfigurationCache.Helpers<T>.SetValue(Database, Scope, Key, Value);
|
||||
}
|
||||
private T GetValue<T>(string Key, T Default)
|
||||
{
|
||||
return ConfigurationCache.Helpers<T>.GetValue(Database, this.Scope, Key, Default);
|
||||
return ConfigurationCache.Helpers<T>.GetValue(Database, Scope, Key, Default);
|
||||
}
|
||||
|
||||
protected void Set<T>(T Value, [CallerMemberName] string Key = null)
|
||||
@@ -46,7 +46,7 @@ namespace Disco.Data.Configuration
|
||||
if (Key == null)
|
||||
throw new ArgumentNullException("Key");
|
||||
|
||||
this.SetValue(Key, Value);
|
||||
SetValue(Key, Value);
|
||||
}
|
||||
|
||||
protected T Get<T>(T Default, [CallerMemberName] string Key = null)
|
||||
@@ -54,17 +54,17 @@ namespace Disco.Data.Configuration
|
||||
if (Key == null)
|
||||
throw new ArgumentNullException("Key");
|
||||
|
||||
return this.GetValue(Key, Default);
|
||||
return GetValue(Key, Default);
|
||||
}
|
||||
|
||||
protected void SetObsfucated(string Value, [CallerMemberName] string Key = null)
|
||||
{
|
||||
this.Set(Value.Obsfucate(), Key);
|
||||
Set(Value.Obsfucate(), Key);
|
||||
}
|
||||
|
||||
protected string GetDeobsfucated(string Default, [CallerMemberName] string Key = null)
|
||||
{
|
||||
var obsfucatedValue = this.Get<string>(null, Key);
|
||||
var obsfucatedValue = Get<string>(null, Key);
|
||||
|
||||
if (obsfucatedValue == null)
|
||||
return Default;
|
||||
@@ -74,35 +74,35 @@ namespace Disco.Data.Configuration
|
||||
|
||||
protected void RemoveScope()
|
||||
{
|
||||
ConfigurationCache.RemoveScope(Database, this.Scope);
|
||||
ConfigurationCache.RemoveScope(Database, Scope);
|
||||
}
|
||||
|
||||
protected void RemoveItem(string Key)
|
||||
{
|
||||
ConfigurationCache.RemoveScopeKey(Database, this.Scope, Key);
|
||||
ConfigurationCache.RemoveScopeKey(Database, Scope, Key);
|
||||
}
|
||||
|
||||
[Obsolete("Types are automatically serialized/deserialized if required, use Set<T>(T Value) instead.")]
|
||||
protected void SetAsJson<T>(T Value, [CallerMemberName] string Key = null)
|
||||
{
|
||||
this.Set(Value, Key);
|
||||
Set(Value, Key);
|
||||
}
|
||||
|
||||
[Obsolete("Types are automatically serialized/deserialized if required, use Get<T>(T Default) instead.")]
|
||||
protected T GetFromJson<T>(T Default, [CallerMemberName] string Key = null)
|
||||
{
|
||||
return this.Get(Default, Key);
|
||||
return Get(Default, Key);
|
||||
}
|
||||
|
||||
[Obsolete("Types are automatically serialized/deserialized if required, use Set<T>(T Value) instead.")]
|
||||
protected void SetAsEnum<T>(T Value, [CallerMemberName] string Key = null)
|
||||
{
|
||||
this.Set(Value, Key);
|
||||
Set(Value, Key);
|
||||
}
|
||||
[Obsolete("Types are automatically serialized/deserialized if required, use Set<T>(T Value) instead.")]
|
||||
protected T GetFromEnum<T>(T Default, [CallerMemberName] string Key = null)
|
||||
{
|
||||
return this.Get(Default, Key);
|
||||
return Get(Default, Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user