diff --git a/Directory.Build.props b/Directory.Build.props index 846484f..1559180 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,6 @@ - net6.0;net7.0;net8.0 - 11.0 + 12.0 IntelliTect enable enable diff --git a/demo/DemoBlazorServer/DemoBlazorServer.csproj b/demo/DemoBlazorServer/DemoBlazorServer.csproj index 2636905..0422694 100644 --- a/demo/DemoBlazorServer/DemoBlazorServer.csproj +++ b/demo/DemoBlazorServer/DemoBlazorServer.csproj @@ -1,8 +1,13 @@ + + + net8.0 + + - + diff --git a/demo/DemoServer/DemoServer.csproj b/demo/DemoServer/DemoServer.csproj index dc12f76..edca771 100644 --- a/demo/DemoServer/DemoServer.csproj +++ b/demo/DemoServer/DemoServer.csproj @@ -3,10 +3,11 @@ false false + net8.0 - + diff --git a/src/IntelliTect.AspNetCore.SignalR.SqlServer/IntelliTect.AspNetCore.SignalR.SqlServer.csproj b/src/IntelliTect.AspNetCore.SignalR.SqlServer/IntelliTect.AspNetCore.SignalR.SqlServer.csproj index 8a4fe5a..55d959d 100644 --- a/src/IntelliTect.AspNetCore.SignalR.SqlServer/IntelliTect.AspNetCore.SignalR.SqlServer.csproj +++ b/src/IntelliTect.AspNetCore.SignalR.SqlServer/IntelliTect.AspNetCore.SignalR.SqlServer.csproj @@ -1,6 +1,7 @@  + net6.0;net8.0 true @@ -13,13 +14,8 @@ - - - - - all - runtime; build; native; contentfiles; analyzers - + + diff --git a/src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/SqlServerProtocol.cs b/src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/SqlServerProtocol.cs index 3cc0a3e..0c9b4fa 100644 --- a/src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/SqlServerProtocol.cs +++ b/src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/SqlServerProtocol.cs @@ -133,7 +133,7 @@ private SqlServerInvocation ReadInvocationCore(ref MessagePackReader reader) var ids = new string[idCount]; for (var i = 0; i < idCount; i++) { - ids[i] = reader.ReadString(); + ids[i] = reader.ReadString()!; } excludedConnectionIds = ids; @@ -152,7 +152,7 @@ public SqlServerTargetedInvocation ReadTargetedInvocation(ReadOnlyMemory d ValidateArraySize(ref reader, 3, "TargetedInvocation"); // Read target - var target = reader.ReadString(); + var target = reader.ReadString()!; var invocation = ReadInvocationCore(ref reader); @@ -190,7 +190,7 @@ public SqlServerAckMessage ReadAck(ReadOnlyMemory data) // See WriteAck for format reader.ReadByte(); // Skip header ValidateArraySize(ref reader, 2, "Ack"); - return new SqlServerAckMessage(reader.ReadInt32(), reader.ReadString()); + return new SqlServerAckMessage(reader.ReadInt32(), reader.ReadString()!); } @@ -236,10 +236,10 @@ public SqlServerGroupCommand ReadGroupCommand(ReadOnlyMemory data) ValidateArraySize(ref reader, 5, "GroupCommand"); var id = reader.ReadInt32(); - var serverName = reader.ReadString(); + var serverName = reader.ReadString()!; var action = (GroupAction)reader.ReadByte(); - var groupName = reader.ReadString(); - var connectionId = reader.ReadString(); + var groupName = reader.ReadString()!; + var connectionId = reader.ReadString()!; return new SqlServerGroupCommand(id, serverName, action, groupName, connectionId); } @@ -270,7 +270,7 @@ public static SerializedHubMessage ReadSerializedHubMessage(ref MessagePackReade var serializations = new SerializedMessage[count]; for (var i = 0; i < count; i++) { - var protocol = reader.ReadString(); + var protocol = reader.ReadString()!; var serialized = reader.ReadBytes()?.ToArray() ?? Array.Empty(); serializations[i] = new SerializedMessage(protocol, serialized); diff --git a/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/IntelliTect.AspNetCore.SignalR.SqlServer.Tests.csproj b/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/IntelliTect.AspNetCore.SignalR.SqlServer.Tests.csproj index 114c9ec..e128318 100644 --- a/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/IntelliTect.AspNetCore.SignalR.SqlServer.Tests.csproj +++ b/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/IntelliTect.AspNetCore.SignalR.SqlServer.Tests.csproj @@ -1,19 +1,19 @@  + net8.0 false - - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/SqlServerEndToEndTests.cs b/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/SqlServerEndToEndTests.cs index 24ddc56..21ffbba 100644 --- a/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/SqlServerEndToEndTests.cs +++ b/test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/SqlServerEndToEndTests.cs @@ -16,7 +16,7 @@ public class SqlServerEndToEndTests { private const string databaseName = "SignalRUnitTestsDb"; private const string connectionString = - "Server=localhost;Database=" + databaseName + ";Trusted_Connection=True;Timeout=5"; + "Server=localhost;Database=" + databaseName + ";Trusted_Connection=True;Timeout=5;TrustServerCertificate=True"; [SkippableFact] public async Task CanSendAndReceivePayloads_WithServiceBroker()