Skip to content

Commit 52cdf8c

Browse files
committed
Adjust namespaces, other cleanup
1 parent 1c17fa1 commit 52cdf8c

22 files changed

+44
-240
lines changed

demo/DemoServer/DemoServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<ProjectReference Include="..\..\src\IntelliTect.SignalR.SqlServer\IntelliTect.SignalR.SqlServer.csproj" />
13+
<ProjectReference Include="..\..\src\IntelliTect.AspNetCore.SignalR.SqlServer\IntelliTect.AspNetCore.SignalR.SqlServer.csproj" />
1414
</ItemGroup>
1515

1616
</Project>

demo/DemoServer/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"LogLevel": {
44
"Default": "Information",
55
"Microsoft": "Warning",
6-
"IntelliTect.SignalR": "Trace",
6+
"IntelliTect.AspNetCore.SignalR": "Trace",
77
"Microsoft.Hosting.Lifetime": "Information"
88
}
99
},

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/AckHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Threading.Tasks;
88
using Microsoft.Extensions.Internal;
99

10-
namespace IntelliTect.SignalR.SqlServer.Internal
10+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal
1111
{
1212
internal class AckHandler : IDisposable
1313
{

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/DefaultHubMessageSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.AspNetCore.SignalR;
88
using Microsoft.AspNetCore.SignalR.Protocol;
99

10-
namespace IntelliTect.SignalR.Internal
10+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal
1111
{
1212
internal class DefaultHubMessageSerializer
1313
{

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/Log.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,27 @@
55
using System.Linq;
66
using Microsoft.Extensions.Logging;
77

8-
namespace IntelliTect.SignalR.SqlServer.Internal
8+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal
99
{
1010
internal static class Log
1111
{
1212
//private static readonly LogDefineOptions SkipEnabledCheckLogOptions = new() { SkipEnabledCheck = true };
1313

1414
private static readonly Action<ILogger, string, Exception?> _received =
15-
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, "ReceivedFromSqlServer"), "Received {Type} message from SQL Server.");
15+
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(1, "ReceivedFromSqlServer"),
16+
"Received {Type} message from SQL Server.");
1617

1718
private static readonly Action<ILogger, string, Exception?> _publish =
18-
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(5, "PublishToSqlServer"), "Publishing {Type} message to SQL Server.");
19+
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(2, "PublishToSqlServer"),
20+
"Publishing {Type} message to SQL Server.");
1921

2022
private static readonly Action<ILogger, Exception> _internalMessageFailed =
21-
LoggerMessage.Define(LogLevel.Warning, new EventId(11, "InternalMessageFailed"), "Error processing message for internal server message.");
23+
LoggerMessage.Define(LogLevel.Warning, new EventId(3, "InternalMessageFailed"),
24+
"Error processing message for internal server message.");
25+
26+
private static readonly Action<ILogger, byte, string, string, Exception?> _unexpectedNotificationType =
27+
LoggerMessage.Define<byte, string, string>(LogLevel.Warning, new EventId(4, "UnexpectedNotificationType"),
28+
"An unexpected SqlNotificationType was received. Details: Type={Type}, Source={Source}, Info={Info}.");
2229

2330

2431
public static void Received(this ILogger logger, string messageType)
@@ -35,5 +42,10 @@ public static void InternalMessageFailed(this ILogger logger, Exception exceptio
3542
{
3643
_internalMessageFailed(logger, exception);
3744
}
45+
46+
public static void UnexpectedNotificationType(this ILogger logger, byte messageType, string source, string info)
47+
{
48+
_unexpectedNotificationType(logger, messageType, source, info, null);
49+
}
3850
}
3951
}

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/Messages/AckMessage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using IntelliTect.SignalR;
1+
using IntelliTect.AspNetCore.SignalR;
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace IntelliTect.SignalR.SqlServer.Internal.Messages
8+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal.Messages
99
{
1010
internal readonly struct AckMessage
1111
{

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/Messages/GroupAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
namespace IntelliTect.SignalR.SqlServer.Internal
4+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal
55
{
66
// The size of the enum is defined by the protocol. Do not change it. If you need more than 255 items,
77
// add an additional enum.

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/Messages/MessageType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using IntelliTect.SignalR;
1+
using IntelliTect.AspNetCore.SignalR;
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace IntelliTect.SignalR.SqlServer.Internal.Messages
8+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal.Messages
99
{
1010
// The size of the enum is defined by the protocol. Do not change it. If you need more than 255 items,
1111
// add an additional enum.

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/Messages/SqlServerGroupCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
namespace IntelliTect.SignalR.SqlServer.Internal
4+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal
55
{
66
internal readonly struct SqlServerGroupCommand
77
{

src/IntelliTect.AspNetCore.SignalR.SqlServer/Internal/Messages/SqlServerInvocation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using IntelliTect.SignalR;
1+
using IntelliTect.AspNetCore.SignalR;
22
using Microsoft.AspNetCore.SignalR;
33
using System;
44
using System.Collections.Generic;
55
using System.Linq;
66
using System.Text;
77
using System.Threading.Tasks;
88

9-
namespace IntelliTect.SignalR.SqlServer.Internal.Messages
9+
namespace IntelliTect.AspNetCore.SignalR.SqlServer.Internal.Messages
1010
{
1111

1212
internal readonly struct SqlServerInvocation

0 commit comments

Comments
 (0)