diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-07-17 13:51:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-17 13:51:29 +0200 |
| commit | 37fe9df27c446baa261846424140ee420d57914f (patch) | |
| tree | 45eb2d5d98ceb24f10b7442a7d67e0eb7dd804e5 | |
| parent | 8759ad4d4986c6b5ebea1030ceca5f472065b741 (diff) | |
| parent | f8aad322ccabcc377b522e3abb375dd67476f375 (diff) | |
Merge pull request #17338 from mbastian77/docs/deviceid-xml-docs
| -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"); |
