diff --git a/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderService.cs b/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderService.cs index b0673ab..deecc74 100644 --- a/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderService.cs +++ b/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderService.cs @@ -120,7 +120,7 @@ public bool SupportsPath(string virtualPath) options.IgnorePrefixCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal)); } - private static string SanitizeImageExtension(string extension) + private static string? SanitizeImageExtension(string extension) { //TODO: Deduplicate this function when making Imazen.ImageAPI.Client extension = extension.ToLowerInvariant().TrimStart('.'); diff --git a/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderServiceOptions.cs b/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderServiceOptions.cs index 3229567..9927953 100644 --- a/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderServiceOptions.cs +++ b/src/Imageflow.Server.Storage.RemoteReader/RemoteReaderServiceOptions.cs @@ -6,14 +6,14 @@ namespace Imageflow.Server.Storage.RemoteReader public class RemoteReaderServiceOptions { internal readonly List Prefixes = new List(); - public string SigningKey { get; set; } + public required string SigningKey { get; set; } /// /// Sometimes you need to support multiple signing keys; either for different users or for /// phasing out a leaked key. Trying multiple keys during each request adds a bit a processing time; /// benchmark performance if you have many. /// - public IEnumerable SigningKeys { get; set; } + public IEnumerable? SigningKeys { get; set; } public bool IgnorePrefixCase { get; set; } public Func HttpClientSelector { get; set; } = _ => ""; diff --git a/src/Imazen.HybridCache/AsyncCache.cs b/src/Imazen.HybridCache/AsyncCache.cs index ddd261c..287177f 100644 --- a/src/Imazen.HybridCache/AsyncCache.cs +++ b/src/Imazen.HybridCache/AsyncCache.cs @@ -487,7 +487,7 @@ private static bool IsFileLocked(IOException exception) // // - private BlobCacheSupportData SupportData { get; set; } + private BlobCacheSupportData? SupportData { get; set; } public void Initialize(BlobCacheSupportData supportData) { SupportData = supportData; diff --git a/src/Imazen.HybridCache/HybridCache.cs b/src/Imazen.HybridCache/HybridCache.cs index 2497ba9..4c45223 100644 --- a/src/Imazen.HybridCache/HybridCache.cs +++ b/src/Imazen.HybridCache/HybridCache.cs @@ -18,7 +18,7 @@ public class HybridCache : IBlobCache private CleanupManager CleanupManager { get; } private ICacheDatabase Database { get; } - private BlobCacheSupportData SupportData { get; set; } + private BlobCacheSupportData? SupportData { get; set; } public string UniqueName { get; } diff --git a/tests/ImazenShared.Tests/Routing/Serving/MemoryLogger.cs b/tests/ImazenShared.Tests/Routing/Serving/MemoryLogger.cs index e9cd037..7b9842c 100644 --- a/tests/ImazenShared.Tests/Routing/Serving/MemoryLogger.cs +++ b/tests/ImazenShared.Tests/Routing/Serving/MemoryLogger.cs @@ -29,7 +29,11 @@ public class MemoryLogger(string categoryName, Func? fil private static readonly AsyncLocal> Scopes = new AsyncLocal>(); - public IDisposable BeginScope(TState state) + public IDisposable BeginScope(TState state) +#if DOTNET8_0_OR_GREATER + where TState : notnull +#endif + where TState : notnull { if (state == null) throw new ArgumentNullException(nameof(state));