diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-12-11 01:14:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-11 01:14:55 +0900 |
| commit | 67922dff50967c02e8c0c10f43884fd4e788b012 (patch) | |
| tree | 40d05de6e82107337d20b62a2d3f3bd93ca71a45 /Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs | |
| parent | 2a7210ca287f9b7421a9c50497434c3839b07f7f (diff) | |
| parent | affb58ef9e11f7f14192c76074b1199604f6bd67 (diff) | |
Merge pull request #2041 from Bond-009/warn11
Fix more warnings
Diffstat (limited to 'Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs index 2a5d56c60..080cfbbd1 100644 --- a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs +++ b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs @@ -133,6 +133,10 @@ namespace Emby.Server.Implementations.AppBase } } + /// <summary> + /// Adds parts. + /// </summary> + /// <param name="factories">The configuration factories.</param> public virtual void AddParts(IEnumerable<IConfigurationFactory> factories) { _configurationFactories = factories.ToArray(); @@ -247,6 +251,10 @@ namespace Emby.Server.Implementations.AppBase } } + /// <summary> + /// Ensures that we have write access to the path. + /// </summary> + /// <param name="path">The path.</param> protected void EnsureWriteAccess(string path) { var file = Path.Combine(path, Guid.NewGuid().ToString()); @@ -259,6 +267,7 @@ namespace Emby.Server.Implementations.AppBase return Path.Combine(CommonApplicationPaths.ConfigurationDirectoryPath, key.ToLowerInvariant() + ".xml"); } + /// <inheritdoc /> public object GetConfiguration(string key) { return _configurations.GetOrAdd(key, k => @@ -305,6 +314,7 @@ namespace Emby.Server.Implementations.AppBase } } + /// <inheritdoc /> public void SaveConfiguration(string key, object configuration) { var configurationStore = GetConfigurationStore(key); @@ -341,6 +351,11 @@ namespace Emby.Server.Implementations.AppBase OnNamedConfigurationUpdated(key, configuration); } + /// <summary> + /// Event handler for when a named configuration has been updated. + /// </summary> + /// <param name="key">The key of the configuration.</param> + /// <param name="configuration">The old configuration.</param> protected virtual void OnNamedConfigurationUpdated(string key, object configuration) { NamedConfigurationUpdated?.Invoke(this, new ConfigurationUpdateEventArgs @@ -350,6 +365,7 @@ namespace Emby.Server.Implementations.AppBase }); } + /// <inheritdoc /> public Type GetConfigurationType(string key) { return GetConfigurationStore(key) |
