diff options
| author | Stepan Goremykin <goremukin@gmail.com> | 2023-10-08 00:40:58 +0200 |
|---|---|---|
| committer | Stepan Goremykin <goremukin@gmail.com> | 2023-10-08 00:40:58 +0200 |
| commit | 526f9a825c8205942155759afc5fc1e7a8f6fc6a (patch) | |
| tree | 560a23cf11a62a816af646e47be2bfd11043751c /Emby.Server.Implementations | |
| parent | 2360d28cbb8b2538c371e542b004aeb257711d58 (diff) | |
Make files readonly
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs index 6edfad575..39524be1d 100644 --- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs +++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs @@ -10,8 +10,6 @@ namespace Emby.Server.Implementations.AppBase /// </summary> public abstract class BaseApplicationPaths : IApplicationPaths { - private string _dataPath; - /// <summary> /// Initializes a new instance of the <see cref="BaseApplicationPaths"/> class. /// </summary> @@ -33,7 +31,7 @@ namespace Emby.Server.Implementations.AppBase CachePath = cacheDirectoryPath; WebPath = webDirectoryPath; - _dataPath = Directory.CreateDirectory(Path.Combine(ProgramDataPath, "data")).FullName; + DataPath = Directory.CreateDirectory(Path.Combine(ProgramDataPath, "data")).FullName; } /// <summary> @@ -55,7 +53,7 @@ namespace Emby.Server.Implementations.AppBase /// Gets the folder path to the data directory. /// </summary> /// <value>The data directory.</value> - public string DataPath => _dataPath; + public string DataPath { get; } /// <inheritdoc /> public string VirtualDataPath => "%AppDataPath%"; diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs index 54191649d..f810bf170 100644 --- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs @@ -40,9 +40,9 @@ namespace Emby.Server.Implementations.EntryPoints /// <summary> /// The UDP server. /// </summary> - private List<UdpServer> _udpServers; - private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); - private bool _disposed = false; + private readonly List<UdpServer> _udpServers; + private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); + private bool _disposed; /// <summary> /// Initializes a new instance of the <see cref="UdpServerEntryPoint" /> class. |
