diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-13 23:28:05 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-13 23:28:05 +0100 |
| commit | ae0732136fe72e5e3c26517e9e350178bf2e9b59 (patch) | |
| tree | cdfc9cd6ce97ceca0b2d8d3023d9815f80357dd5 /Emby.Server.Implementations/Security/PluginSecurityManager.cs | |
| parent | d7b7be395b76c7fcc49d3baffeb59d51a9b36378 (diff) | |
| parent | f8dd182e422db49d98cc090f4e205cc46517f610 (diff) | |
Merge remote-tracking branch 'upstream/dev' into build-system-consolidation
Diffstat (limited to 'Emby.Server.Implementations/Security/PluginSecurityManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Security/PluginSecurityManager.cs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Emby.Server.Implementations/Security/PluginSecurityManager.cs b/Emby.Server.Implementations/Security/PluginSecurityManager.cs index 2b1494c39..dc606f2b9 100644 --- a/Emby.Server.Implementations/Security/PluginSecurityManager.cs +++ b/Emby.Server.Implementations/Security/PluginSecurityManager.cs @@ -34,10 +34,7 @@ namespace Emby.Server.Implementations.Security } private MBLicenseFile _licenseFile; - private MBLicenseFile LicenseFile - { - get { return _licenseFile ?? (_licenseFile = new MBLicenseFile(_appPaths, _fileSystem, _cryptographyProvider)); } - } + private MBLicenseFile LicenseFile => _licenseFile ?? (_licenseFile = new MBLicenseFile(_appPaths, _fileSystem, _cryptographyProvider)); private readonly IHttpClient _httpClient; private readonly IJsonSerializer _jsonSerializer; @@ -55,7 +52,7 @@ namespace Emby.Server.Implementations.Security { if (httpClient == null) { - throw new ArgumentNullException("httpClient"); + throw new ArgumentNullException(nameof(httpClient)); } _appHost = appHost; @@ -82,14 +79,8 @@ namespace Emby.Server.Implementations.Security /// <value>The supporter key.</value> public string SupporterKey { - get - { - return LicenseFile.RegKey; - } - set - { - throw new Exception("Please call UpdateSupporterKey"); - } + get => LicenseFile.RegKey; + set => throw new Exception("Please call UpdateSupporterKey"); } public async Task UpdateSupporterKey(string newValue) @@ -138,7 +129,7 @@ namespace Emby.Server.Implementations.Security _logger.LogError(msg); throw new ArgumentException(msg); } - if (!String.IsNullOrEmpty(reg.key)) + if (!string.IsNullOrEmpty(reg.key)) { await UpdateSupporterKey(reg.key).ConfigureAwait(false); } |
