diff --git a/Demo/Demo.csproj b/Demo/Demo.csproj index 24c5713e..cee1f1f2 100644 --- a/Demo/Demo.csproj +++ b/Demo/Demo.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/Tests/YDotNet.Tests.Driver/YDotNet.Tests.Driver.csproj b/Tests/YDotNet.Tests.Driver/YDotNet.Tests.Driver.csproj index 8779fb6b..0ea52e05 100644 --- a/Tests/YDotNet.Tests.Driver/YDotNet.Tests.Driver.csproj +++ b/Tests/YDotNet.Tests.Driver/YDotNet.Tests.Driver.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable diff --git a/Tests/YDotNet.Tests.Server.Unit/YDotNet.Tests.Server.Unit.csproj b/Tests/YDotNet.Tests.Server.Unit/YDotNet.Tests.Server.Unit.csproj index 20e30a23..41eff798 100644 --- a/Tests/YDotNet.Tests.Server.Unit/YDotNet.Tests.Server.Unit.csproj +++ b/Tests/YDotNet.Tests.Server.Unit/YDotNet.Tests.Server.Unit.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable false diff --git a/Tests/YDotNet.Tests.Unit/YDotNet.Tests.Unit.csproj b/Tests/YDotNet.Tests.Unit/YDotNet.Tests.Unit.csproj index 229e7db1..f346c700 100644 --- a/Tests/YDotNet.Tests.Unit/YDotNet.Tests.Unit.csproj +++ b/Tests/YDotNet.Tests.Unit/YDotNet.Tests.Unit.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable false YDotNet.Tests.Unit.Program diff --git a/YDotNet.Extensions/YDotNet.Extensions.csproj b/YDotNet.Extensions/YDotNet.Extensions.csproj index 04427bbd..b4d87ea0 100644 --- a/YDotNet.Extensions/YDotNet.Extensions.csproj +++ b/YDotNet.Extensions/YDotNet.Extensions.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/YDotNet.Server.MongoDB/MongoDocumentStorage.cs b/YDotNet.Server.MongoDB/MongoDocumentStorage.cs index 3c7854bc..3079e921 100644 --- a/YDotNet.Server.MongoDB/MongoDocumentStorage.cs +++ b/YDotNet.Server.MongoDB/MongoDocumentStorage.cs @@ -12,7 +12,7 @@ public sealed class MongoDocumentStorage : IDocumentStorage, IHostedService private readonly IMongoClient mongoClient; private IMongoCollection? collection; - public Func Clock = () => DateTime.UtcNow; + public Func Clock { get; set; } = () => DateTime.UtcNow; public MongoDocumentStorage(IMongoClient mongoClient, IOptions options) { diff --git a/YDotNet.Server.MongoDB/YDotNet.Server.MongoDB.csproj b/YDotNet.Server.MongoDB/YDotNet.Server.MongoDB.csproj index f3ce0769..dd6db564 100644 --- a/YDotNet.Server.MongoDB/YDotNet.Server.MongoDB.csproj +++ b/YDotNet.Server.MongoDB/YDotNet.Server.MongoDB.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/YDotNet.Server.Redis/YDotNet.Server.Redis.csproj b/YDotNet.Server.Redis/YDotNet.Server.Redis.csproj index b33a0a72..eeabd109 100644 --- a/YDotNet.Server.Redis/YDotNet.Server.Redis.csproj +++ b/YDotNet.Server.Redis/YDotNet.Server.Redis.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/YDotNet.Server.WebSockets/YDotNet.Server.WebSockets.csproj b/YDotNet.Server.WebSockets/YDotNet.Server.WebSockets.csproj index a4dd4fba..9e048562 100644 --- a/YDotNet.Server.WebSockets/YDotNet.Server.WebSockets.csproj +++ b/YDotNet.Server.WebSockets/YDotNet.Server.WebSockets.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/YDotNet.Server.WebSockets/YDotNetWebSocketOptions.cs b/YDotNet.Server.WebSockets/YDotNetWebSocketOptions.cs index 5c24b0d8..f76bb737 100644 --- a/YDotNet.Server.WebSockets/YDotNetWebSocketOptions.cs +++ b/YDotNet.Server.WebSockets/YDotNetWebSocketOptions.cs @@ -2,7 +2,9 @@ namespace YDotNet.Server.WebSockets; +#pragma warning disable MA0048 // File name must match type name public delegate Task AuthDelegate(HttpContext httpContext, DocumentContext context); +#pragma warning restore MA0048 // File name must match type name public sealed class YDotNetWebSocketOptions { diff --git a/YDotNet.Server/DefaultDocumentCleaner.cs b/YDotNet.Server/DefaultDocumentCleaner.cs index 4889fd80..3b4440c6 100644 --- a/YDotNet.Server/DefaultDocumentCleaner.cs +++ b/YDotNet.Server/DefaultDocumentCleaner.cs @@ -39,6 +39,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) var now = Clock(); var timeSinceLastLogging = now - lastLogging; + // We run this loop very often. If there is an exception, it could flood the log with duplicate log entries. if (timeSinceLastLogging < options.LogWaitTime) { diff --git a/YDotNet.Server/YDotNet.Server.csproj b/YDotNet.Server/YDotNet.Server.csproj index 4f054d35..a5f77ebf 100644 --- a/YDotNet.Server/YDotNet.Server.csproj +++ b/YDotNet.Server/YDotNet.Server.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/YDotNet/YDotNet.csproj b/YDotNet/YDotNet.csproj index 57a24a00..f4614d93 100644 --- a/YDotNet/YDotNet.csproj +++ b/YDotNet/YDotNet.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable true diff --git a/YDotNet/YDotNetException.cs b/YDotNet/YDotNetException.cs index 02b45a20..8210a8d8 100644 --- a/YDotNet/YDotNetException.cs +++ b/YDotNet/YDotNetException.cs @@ -5,7 +5,6 @@ namespace YDotNet; /// /// Represents an YDotNetException. /// -[Serializable] public class YDotNetException : Exception { /// @@ -33,14 +32,4 @@ public YDotNetException(string message, Exception inner) : base(message, inner) { } - - /// - /// Initializes a new instance of the class for serialization. - /// - /// The serialization info. - /// The serialization context. - protected YDotNetException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/native/YDotNet.Native.Linux/YDotNet.Native.Linux.csproj b/native/YDotNet.Native.Linux/YDotNet.Native.Linux.csproj index 85e61763..2beffc45 100644 --- a/native/YDotNet.Native.Linux/YDotNet.Native.Linux.csproj +++ b/native/YDotNet.Native.Linux/YDotNet.Native.Linux.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/native/YDotNet.Native.MacOS/YDotNet.Native.MacOS.csproj b/native/YDotNet.Native.MacOS/YDotNet.Native.MacOS.csproj index afe01ee0..534bd8da 100644 --- a/native/YDotNet.Native.MacOS/YDotNet.Native.MacOS.csproj +++ b/native/YDotNet.Native.MacOS/YDotNet.Native.MacOS.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/native/YDotNet.Native.Win32/YDotNet.Native.Win32.csproj b/native/YDotNet.Native.Win32/YDotNet.Native.Win32.csproj index 6c079c3a..099b4033 100644 --- a/native/YDotNet.Native.Win32/YDotNet.Native.Win32.csproj +++ b/native/YDotNet.Native.Win32/YDotNet.Native.Win32.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/native/YDotNet.Native/YDotNet.Native.csproj b/native/YDotNet.Native/YDotNet.Native.csproj index ea0ed724..76ea0d5c 100644 --- a/native/YDotNet.Native/YDotNet.Native.csproj +++ b/native/YDotNet.Native/YDotNet.Native.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable