Nucleus .Net Core CMS

Configuration.ConfigurationFile Class

Namespace: Nucleus.Extensions.Configuration
Assembly: Nucleus.Extensions.dll
Configuration file manager.
ConfigurationFile (KnownConfigurationFiles configurationFile, String environmentName)
Opens the specified file.
Parameters
Name Type
configurationFile Nucleus.Extensions.Configuration.ConfigurationFile.KnownConfigurationFiles
environmentName String
CommitChanges ()
Save changes.
GetArray (String[] keys)
Retrieve an existing section from the configuration file, or create the section if it does not exist.
Parameters
Name Type
keys String[]
GetObject (JObject section, String key)
Retrieve an existing section from the configuration file, or create a new section if it does not exist.
Parameters
Name Type
section Newtonsoft.Json.Linq.JObject
key String
GetObject (JArray section, String key, String value)
Retrieve an existing section from the configuration file, or create a new section if it does not exist.
Parameters
Name Type
section Newtonsoft.Json.Linq.JArray
key String
value String
GetSection (String[] keys)
Retrieve an existing section from the configuration file, or create the section if it does not exist.
Parameters
Name Type
keys String[]
GetSection (String key)
Retrieve an existing section from the configuration file.
Parameters
Name Type
key String
GetSection (JContainer section, String key)
Retrieve an existing section from the configuration file, or create a new section if it does not exist.
Parameters
Name Type
section Newtonsoft.Json.Linq.JContainer
key String
GetToken (String path)
Retrieve a token from the specified section.
Parameters
Name Type
path String
GetToken (JObject section, String key)
Retrieve a token from the specified section.
Parameters
Name Type
section Newtonsoft.Json.Linq.JObject
key String
RemoveObject (JArray section, String key, String value)
Remove an existing section from the configuration file if a match exists.
Parameters
Name Type
section Newtonsoft.Json.Linq.JArray
key String
value String
Set (JObject section, String key, Object value)
Add or replace a value.
Parameters
Name Type
section Newtonsoft.Json.Linq.JObject
key String
value Object
Set (JArray section, Object value)
Add or replace a value.
Parameters
Name Type
section Newtonsoft.Json.Linq.JArray
value Object