Skip to content

Commit abdf55c

Browse files
committed
Improve nullable annotation on CancelInvocationMessage.InvocationId
This declares a `new` property for `string InvocationId { get; }` so that the compiler sees it as non-nullable, consistent with the constructor declared on the same type.
1 parent 4069504 commit abdf55c

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

src/SignalR/common/SignalR.Common/src/Protocol/CancelInvocationMessage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ public class CancelInvocationMessage : HubInvocationMessage
1717
public CancelInvocationMessage(string invocationId) : base(invocationId)
1818
{
1919
}
20+
21+
/// <inheritdoc cref="HubInvocationMessage.InvocationId" />
22+
public new string InvocationId => base.InvocationId!;
2023
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
#nullable enable
2+
Microsoft.AspNetCore.SignalR.Protocol.CancelInvocationMessage.InvocationId.get -> string
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
#nullable enable
2+
Microsoft.AspNetCore.SignalR.Protocol.CancelInvocationMessage.InvocationId.get -> string
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
#nullable enable
2+
Microsoft.AspNetCore.SignalR.Protocol.CancelInvocationMessage.InvocationId.get -> string

0 commit comments

Comments
 (0)