diff options
| author | mbastian77 <michael.bastian@visop.de> | 2026-07-15 11:58:29 +0200 |
|---|---|---|
| committer | mbastian77 <michael.bastian@visop.de> | 2026-07-15 11:58:29 +0200 |
| commit | f8aad322ccabcc377b522e3abb375dd67476f375 (patch) | |
| tree | 23949c6b358777fe709563c441253ee8b49f2367 /Emby.Server.Implementations/Devices | |
| parent | b6882c86dccfdda94991f0ed978c6f0d0fe4c4ea (diff) | |
Add XML docs to DeviceId and remove CS1591 suppression
Diffstat (limited to 'Emby.Server.Implementations/Devices')
| -rw-r--r-- | Emby.Server.Implementations/Devices/DeviceId.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Devices/DeviceId.cs b/Emby.Server.Implementations/Devices/DeviceId.cs index 0b3c3bbd4f..4929568935 100644 --- a/Emby.Server.Implementations/Devices/DeviceId.cs +++ b/Emby.Server.Implementations/Devices/DeviceId.cs @@ -1,5 +1,3 @@ -#pragma warning disable CS1591 - using System; using System.Globalization; using System.IO; @@ -10,6 +8,9 @@ using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.Devices { + /// <summary> + /// Provides the persistent unique identifier of this server installation. + /// </summary> public class DeviceId { private readonly IApplicationPaths _appPaths; @@ -18,12 +19,20 @@ namespace Emby.Server.Implementations.Devices private string? _id; + /// <summary> + /// Initializes a new instance of the <see cref="DeviceId"/> class. + /// </summary> + /// <param name="appPaths">Instance of the <see cref="IApplicationPaths"/> interface.</param> + /// <param name="logger">Instance of the <see cref="ILogger{DeviceId}"/> interface.</param> public DeviceId(IApplicationPaths appPaths, ILogger<DeviceId> logger) { _appPaths = appPaths; _logger = logger; } + /// <summary> + /// Gets the device id, loading it from disk or generating and persisting a new one if none exists. + /// </summary> public string Value => _id ??= GetDeviceId(); private string CachePath => Path.Combine(_appPaths.DataPath, "device.txt"); |
