Skip to content

Commit 9f57987

Browse files
committed
Various bits of documentation
1 parent ba62291 commit 9f57987

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

src/IntelliTect.AspNetCore.SignalR.SqlServer/IntelliTect.AspNetCore.SignalR.SqlServer.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
55
<LangVersion>9.0</LangVersion>
66
<Nullable>enable</Nullable>
7+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
78

89
<RepositoryUrl>https://github.com/IntelliTect/IntelliTect.AspNetCore.SignalR.SqlServer</RepositoryUrl>
910
<RepositoryType>git</RepositoryType>
@@ -20,7 +21,7 @@
2021
</PropertyGroup>
2122

2223
<ItemGroup>
23-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
24+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
2425

2526
<PackageReference Include="MessagePack" Version="2.3.75" />
2627
<PackageReference Include="Microsoft.Data.SqlClient" Version="3.0.0" />

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,15 @@ private bool StartSqlDependencyListener()
364364
}
365365
catch (InvalidOperationException)
366366
{
367-
_logger.LogWarning("{0}SQL Service Broker is disabled. Falling back on periodic polling.", _tracePrefix);
367+
_logger.LogWarning("{0}SQL Service Broker is disabled on the target database.", _tracePrefix);
368368
_notificationsDisabled = true;
369369
return false;
370370
}
371371
catch (NullReferenceException)
372372
{
373373
// Workaround for https://github.com/dotnet/SqlClient/issues/1264
374374

375-
_logger.LogWarning("{0}SQL Service Broker is disabled. Falling back on periodic polling.", _tracePrefix);
375+
_logger.LogWarning("{0}SQL Service Broker is disabled or unsupported by the target database.", _tracePrefix);
376376
_notificationsDisabled = true;
377377
return false;
378378
}
@@ -382,7 +382,7 @@ private bool StartSqlDependencyListener()
382382
// Specifically that Azure SQL Database reports that service broker is enabled,
383383
// even though it is entirely unsupported.
384384

385-
_logger.LogWarning("{0}SQL Service Broker is unsupported by the target database. Falling back on periodic polling.", _tracePrefix);
385+
_logger.LogWarning("{0}SQL Service Broker is unsupported by the target database.", _tracePrefix);
386386
_notificationsDisabled = true;
387387
return false;
388388
}

src/IntelliTect.AspNetCore.SignalR.SqlServer/SqlServerHubLifetimeManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ private async Task SendGroupActionAndWaitForAck(string connectionId, string grou
362362
await ack;
363363
}
364364

365+
/// <inheritdoc/>
365366
public void Dispose()
366367
{
367368
_disposed = true;

src/IntelliTect.AspNetCore.SignalR.SqlServer/SqlServerMessageMode.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,25 @@
99

1010
namespace IntelliTect.AspNetCore.SignalR.SqlServer
1111
{
12-
12+
/// <summary>
13+
/// Specifies the allowed modes of acquiring scaleout messages from SQL Server.
14+
/// </summary>
15+
[Flags]
1316
public enum SqlServerMessageMode
1417
{
18+
/// <summary>
19+
/// Use SQL Server Service Broker for dicovering when new messages are available.
20+
/// </summary>
1521
ServiceBroker = 1 << 0,
22+
23+
/// <summary>
24+
/// Use perioid polling to discover when new messages are available.
25+
/// </summary>
1626
Polling = 1 << 1,
1727

28+
/// <summary>
29+
/// Use the most suitable mode for acquring messages.
30+
/// </summary>
1831
Auto = ServiceBroker | Polling,
1932
}
2033
}

src/IntelliTect.AspNetCore.SignalR.SqlServer/SqlServerOptions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public class SqlServerOptions
4646
/// </summary>
4747
public bool AutoEnableServiceBroker { get; set; } = false;
4848

49+
/// <summary>
50+
/// Flag enum that specifies the allowed modes for retrieving messages from SQL Server. Default Auto.
51+
/// </summary>
4952
public SqlServerMessageMode Mode { get; set; } = SqlServerMessageMode.Auto;
5053
}
5154
}

0 commit comments

Comments
 (0)