aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Security/PluginSecurityManager.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-13 12:14:53 -0500
committerGitHub <noreply@github.com>2019-01-13 12:14:53 -0500
commit9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch)
tree6ca1b2b3decac1a86b886dafd2645954a13601fd /Emby.Server.Implementations/Security/PluginSecurityManager.cs
parent17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff)
parentb936c439321b55bf89c99dac96fc78cefe752e84 (diff)
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'Emby.Server.Implementations/Security/PluginSecurityManager.cs')
-rw-r--r--Emby.Server.Implementations/Security/PluginSecurityManager.cs19
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);
}