From bee5ac6f9ef4a31e2ec89f0e8d4139ff60ffc8d9 Mon Sep 17 00:00:00 2001 From: Eveldee Date: Mon, 7 Jun 2021 01:45:28 +0200 Subject: [PATCH] Add sealed services Also fix a missing IDisposable --- Akari.Prototype.Server/Services/AkariPath.cs | 2 +- Akari.Prototype.Server/Services/AuthLifetimeService.cs | 2 +- Akari.Prototype.Server/Services/FingerprintManager.cs | 2 +- Akari.Prototype.Server/Services/MasterKeyService.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Akari.Prototype.Server/Services/AkariPath.cs b/Akari.Prototype.Server/Services/AkariPath.cs index e40f319..5b42127 100644 --- a/Akari.Prototype.Server/Services/AkariPath.cs +++ b/Akari.Prototype.Server/Services/AkariPath.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace Akari.Prototype.Server.Services { - public class AkariPath + public sealed class AkariPath { private readonly AkariOptions _options; diff --git a/Akari.Prototype.Server/Services/AuthLifetimeService.cs b/Akari.Prototype.Server/Services/AuthLifetimeService.cs index e43c252..9ae495d 100644 --- a/Akari.Prototype.Server/Services/AuthLifetimeService.cs +++ b/Akari.Prototype.Server/Services/AuthLifetimeService.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace Akari.Prototype.Server.Services { - public class AuthLifetimeService : IHostedService + public sealed class AuthLifetimeService : IHostedService, IDisposable { public static TimeSpan CleanupInterval => TimeSpan.FromSeconds(5); public static TimeSpan AuthLifetime => TimeSpan.FromSeconds(30); diff --git a/Akari.Prototype.Server/Services/FingerprintManager.cs b/Akari.Prototype.Server/Services/FingerprintManager.cs index 7b107fb..1291b31 100644 --- a/Akari.Prototype.Server/Services/FingerprintManager.cs +++ b/Akari.Prototype.Server/Services/FingerprintManager.cs @@ -15,7 +15,7 @@ using System.Threading.Tasks; namespace Akari.Prototype.Server.Services { - public class FingerprintManager : IFingerprintManager + public sealed class FingerprintManager : IFingerprintManager { public const string FingerprintsPath = "fingerprints.json"; diff --git a/Akari.Prototype.Server/Services/MasterKeyService.cs b/Akari.Prototype.Server/Services/MasterKeyService.cs index 1761af6..c03a04e 100644 --- a/Akari.Prototype.Server/Services/MasterKeyService.cs +++ b/Akari.Prototype.Server/Services/MasterKeyService.cs @@ -12,7 +12,7 @@ using Microsoft.Extensions.Logging; namespace Akari.Prototype.Server.Services { - public class MasterKeyService : IMasterKeyService, IDisposable + public sealed class MasterKeyService : IMasterKeyService, IDisposable { private record Config(string Hash, string KeySalt);