Class JsonConfigurationServiceBase
Inheritance
System.Object
JsonConfigurationServiceBase
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()
Assembly: mix.shared.dll
Syntax
public class JsonConfigurationServiceBase
Constructors
|
Improve this Doc
View Source
JsonConfigurationServiceBase(String)
Declaration
public JsonConfigurationServiceBase(string filePath)
Parameters
Type |
Name |
Description |
System.String |
filePath |
|
Fields
|
Improve this Doc
View Source
watcher
Declaration
protected readonly FileSystemWatcher watcher
Field Value
Type |
Description |
FileSystemWatcher |
|
Properties
|
Improve this Doc
View Source
AppSettings
Declaration
public JObject AppSettings { get; set; }
Property Value
Type |
Description |
Newtonsoft.Json.Linq.JObject |
|
|
Improve this Doc
View Source
FilePath
Declaration
protected string FilePath { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
GetConfig<T>(String, T)
Declaration
public T GetConfig<T>(string name, T defaultValue = null)
Parameters
Type |
Name |
Description |
System.String |
name |
|
T |
defaultValue |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetConfig<T>(String, String, T)
Declaration
public T GetConfig<T>(string culture, string name, T defaultValue = null)
Parameters
Type |
Name |
Description |
System.String |
culture |
|
System.String |
name |
|
T |
defaultValue |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetEnumConfig<T>(String)
Declaration
public T GetEnumConfig<T>(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type Parameters
|
Improve this Doc
View Source
LoadAppSettings()
Declaration
protected virtual void LoadAppSettings()
|
Improve this Doc
View Source
SaveSettings()
Declaration
public bool SaveSettings()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SetConfig<T>(String, T)
Declaration
public void SetConfig<T>(string name, T value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
T |
value |
|
Type Parameters
|
Improve this Doc
View Source
SetConfig<T>(String, String, T)
Declaration
public void SetConfig<T>(string culture, string name, T value)
Parameters
Type |
Name |
Description |
System.String |
culture |
|
System.String |
name |
|
T |
value |
|
Type Parameters
|
Improve this Doc
View Source
WatchFile()
Declaration
protected void WatchFile()