aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Devices/DeviceId.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Devices/DeviceId.cs')
-rw-r--r--Emby.Server.Implementations/Devices/DeviceId.cs19
1 files changed, 7 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Devices/DeviceId.cs b/Emby.Server.Implementations/Devices/DeviceId.cs
index ce6bd67af..4f5950ac7 100644
--- a/Emby.Server.Implementations/Devices/DeviceId.cs
+++ b/Emby.Server.Implementations/Devices/DeviceId.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.IO;
using System.Text;
using MediaBrowser.Common.Configuration;
@@ -15,10 +15,7 @@ namespace Emby.Server.Implementations.Devices
private readonly object _syncLock = new object();
- private string CachePath
- {
- get { return Path.Combine(_appPaths.DataPath, "device.txt"); }
- }
+ private string CachePath => Path.Combine(_appPaths.DataPath, "device.txt");
private string GetCachedId()
{
@@ -70,7 +67,7 @@ namespace Emby.Server.Implementations.Devices
}
}
- private string GetNewId()
+ private static string GetNewId()
{
return Guid.NewGuid().ToString("N");
}
@@ -92,8 +89,9 @@ namespace Emby.Server.Implementations.Devices
public DeviceId(IApplicationPaths appPaths, ILogger logger, IFileSystem fileSystem)
{
- if (fileSystem == null) {
- throw new ArgumentNullException ("fileSystem");
+ if (fileSystem == null)
+ {
+ throw new ArgumentNullException(nameof(fileSystem));
}
_appPaths = appPaths;
@@ -101,9 +99,6 @@ namespace Emby.Server.Implementations.Devices
_fileSystem = fileSystem;
}
- public string Value
- {
- get { return _id ?? (_id = GetDeviceId()); }
- }
+ public string Value => _id ?? (_id = GetDeviceId());
}
}