1 write to InvocationId
Microsoft.AspNetCore.SignalR.Common (1)
Protocol\HubInvocationMessage.cs (1)
29
InvocationId
= invocationId;
101 references to InvocationId
Microsoft.AspNetCore.Components.Server (6)
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (6)
431
if (string.IsNullOrEmpty(message.
InvocationId
))
437
writer.Write(message.
InvocationId
);
463
writer.Write(message.
InvocationId
);
487
writer.Write(message.
InvocationId
);
535
writer.Write(message.
InvocationId
);
553
writer.Write(message.
InvocationId
);
Microsoft.AspNetCore.SignalR.Client.Core (19)
HubConnection.cs (17)
1303
Log.ArgumentBindingFailure(_logger, bindingFailure.
InvocationId
, bindingFailure.Target, bindingFailure.BindingFailure.SourceException);
1305
if (!string.IsNullOrEmpty(bindingFailure.
InvocationId
))
1307
await SendWithLock(connectionState, CompletionMessage.WithError(bindingFailure.
InvocationId
, "Client failed to parse argument(s)."), cancellationToken: default).ConfigureAwait(false);
1315
Log.ReceivedInvocation(_logger, invocation.
InvocationId
, invocation.Target, invocation.Arguments);
1319
if (!connectionState.TryRemoveInvocation(completion.
InvocationId
!, out irq))
1321
Log.DroppedCompletionMessage(_logger, completion.
InvocationId
!);
1331
if (!connectionState.TryGetInvocation(streamItem.
InvocationId
!, out irq))
1333
Log.DroppedStreamMessage(_logger, streamItem.
InvocationId
!);
1376
var expectsResult = !string.IsNullOrEmpty(invocation.
InvocationId
);
1385
await SendWithLock(connectionState, CompletionMessage.WithError(invocation.
InvocationId
!, "Client didn't provide a result."), cancellationToken: default).ConfigureAwait(false);
1389
Log.ErrorSendingInvocationResult(_logger, invocation.
InvocationId
!, invocation.Target, ex);
1435
await SendWithLock(connectionState, CompletionMessage.WithError(invocation.
InvocationId
!, resultException.Message), cancellationToken: default).ConfigureAwait(false);
1439
await SendWithLock(connectionState, CompletionMessage.WithResult(invocation.
InvocationId
!, result), cancellationToken: default).ConfigureAwait(false);
1444
await SendWithLock(connectionState, CompletionMessage.WithError(invocation.
InvocationId
!, "Client didn't provide a result."), cancellationToken: default).ConfigureAwait(false);
1449
Log.ErrorSendingInvocationResult(_logger, invocation.
InvocationId
!, invocation.Target, ex);
1626
if (string.IsNullOrEmpty(invocationMessage.
InvocationId
))
2327
Log.DroppingMessage(_logger, ((HubInvocationMessage)message).GetType().Name, ((HubInvocationMessage)message).
InvocationId
);
HubConnection.Log.cs (2)
42
SendingMessage(logger, message.GetType().Name, invocationMessage.
InvocationId
);
63
MessageSent(logger, message.GetType().Name, invocationMessage.
InvocationId
);
Microsoft.AspNetCore.SignalR.Common (8)
Protocol\CompletionMessage.cs (2)
54
return $"Completion {{ {nameof(
InvocationId
)}: \"{
InvocationId
}\", {nameof(Error)}: {errorStr}{resultField} }}";
Protocol\HubMethodInvocationMessage.cs (4)
120
return $"InvocationMessage {{ {nameof(
InvocationId
)}: \"{
InvocationId
}\", {nameof(Target)}: \"{Target}\", {nameof(Arguments)}: [ {args} ], {nameof(StreamIds)}: [ {streamIds} ] }}";
175
return $"StreamInvocation {{ {nameof(
InvocationId
)}: \"{
InvocationId
}\", {nameof(Target)}: \"{Target}\", {nameof(Arguments)}: [ {args} ], {nameof(StreamIds)}: [ {streamIds} ] }}";
Protocol\StreamItemMessage.cs (2)
29
return $"StreamItem {{ {nameof(
InvocationId
)}: \"{
InvocationId
}\", {nameof(Item)}: {Item ?? "<<null>>"} }}";
Microsoft.AspNetCore.SignalR.Core (28)
Internal\DefaultHubDispatcher.cs (20)
163
Log.DroppingMessage(_logger, hubMessage.GetType().Name, (hubMessage as HubInvocationMessage)?.
InvocationId
?? "(null)");
186
if (connection.ActiveRequestCancellationSources.TryGetValue(cancelInvocationMessage.
InvocationId
!, out var cts))
188
Log.CancelStream(_logger, cancelInvocationMessage.
InvocationId
!);
213
else if (_hubLifetimeManager.TryGetReturnType(completionMessage.
InvocationId
!, out _))
219
Log.UnexpectedCompletion(_logger, completionMessage.
InvocationId
!);
251
return SendInvocationError(bindingFailureMessage.
InvocationId
, connection, errorMessage);
289
if (!string.IsNullOrEmpty(hubMethodInvocationMessage.
InvocationId
))
293
hubMethodInvocationMessage.
InvocationId
, $"Unknown hub method '{hubMethodInvocationMessage.Target}'")).AsTask();
336
await SendInvocationError(hubMethodInvocationMessage.
InvocationId
, connection,
354
await SendInvocationError(hubMethodInvocationMessage.
InvocationId
, connection,
380
_ = StreamAsync(hubMethodInvocationMessage.
InvocationId
!, connection, arguments, scope, hubActivator, hub, cts, hubMethodInvocationMessage, descriptor);
413
Log.SendingResult(logger, hubMethodInvocationMessage.
InvocationId
, methodExecutor);
420
await SendInvocationError(hubMethodInvocationMessage.
InvocationId
, connection,
442
if (!string.IsNullOrEmpty(hubMethodInvocationMessage.
InvocationId
))
445
await connection.WriteAsync(CompletionMessage.WithResult(hubMethodInvocationMessage.
InvocationId
, result));
467
await SendInvocationError(hubMethodInvocationMessage.
InvocationId
, connection,
473
await SendInvocationError(hubMethodInvocationMessage.
InvocationId
, connection,
696
if (!string.IsNullOrEmpty(hubMethodInvocationMessage.
InvocationId
))
699
await connection.WriteAsync(CompletionMessage.WithError(hubMethodInvocationMessage.
InvocationId
,
709
await connection.WriteAsync(CompletionMessage.WithError(hubMethodInvocationMessage.
InvocationId
!,
Internal\DefaultHubDispatcherLog.cs (3)
75
=> ReceivedStreamItem(logger, message.
InvocationId
);
84
=> CompletingStream(logger, message.
InvocationId
);
90
=> ClosingStreamWithBindingError(logger, message.
InvocationId
, message.Error);
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (3)
54
if (_pendingInvocations.TryGetValue(message.
InvocationId
!, out var item))
58
throw new InvalidOperationException($"Connection ID '{connectionId}' is not valid for invocation ID '{message.
InvocationId
}'.");
64
if (_pendingInvocations.Remove(message.
InvocationId
!, out _))
StreamTracker.cs (2)
54
if (TryGetConverter(message.
InvocationId
!, out var converter))
76
_lookup.TryRemove(message.
InvocationId
!, out var converter);
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
717
if (!string.IsNullOrEmpty(message.
InvocationId
))
719
writer.WriteString(InvocationIdPropertyNameBytes, message.
InvocationId
);
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (6)
Protocol\MessagePackHubProtocolWorker.cs (6)
431
if (string.IsNullOrEmpty(message.
InvocationId
))
437
writer.Write(message.
InvocationId
);
463
writer.Write(message.
InvocationId
);
487
writer.Write(message.
InvocationId
);
535
writer.Write(message.
InvocationId
);
553
writer.Write(message.
InvocationId
);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Protocol\NewtonsoftJsonHubProtocol.cs (2)
696
if (!string.IsNullOrEmpty(message.
InvocationId
))
699
writer.WriteValue(message.
InvocationId
);
Microsoft.AspNetCore.SignalR.Specification.Tests (24)
HubLifetimeManagerTestBase.cs (11)
191
Assert.NotNull(invocation.
InvocationId
);
194
await manager.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithResult(invocation.
InvocationId
, 10)).DefaultTimeout();
218
Assert.NotNull(invocation.
InvocationId
);
221
await manager.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithError(invocation.
InvocationId
, "Error from client")).DefaultTimeout();
248
Assert.NotNull(invocation.
InvocationId
);
252
manager.SetConnectionResultAsync(connection2.ConnectionId, CompletionMessage.WithError(invocation.
InvocationId
, "Error from client"))).DefaultTimeout();
254
Assert.Equal($"Connection ID '{connection2.ConnectionId}' is not valid for invocation ID '{invocation.
InvocationId
}'.", ex.Message);
257
await manager.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithResult(invocation.
InvocationId
, 10)).DefaultTimeout();
307
await manager1.SetConnectionResultAsync(connection2.ConnectionId, CompletionMessage.WithError(invocation2.
InvocationId
, "error"));
312
await manager1.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithResult(invocation1.
InvocationId
, 3));
365
await manager1.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithResult(invocation1.
InvocationId
, 1));
ScaleoutHubLifetimeManagerTests.cs (10)
487
Assert.NotNull(invocation.
InvocationId
);
491
await manager1.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithResult(invocation.
InvocationId
, 10)).DefaultTimeout();
518
Assert.NotNull(invocation.
InvocationId
);
522
await manager1.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithError(invocation.
InvocationId
, "Error from client")).DefaultTimeout();
603
Assert.NotEqual(invocation1.
InvocationId
, invocation2.
InvocationId
);
605
await manager1.SetConnectionResultAsync(connection.ConnectionId, CompletionMessage.WithResult(invocation2.
InvocationId
, 2)).DefaultTimeout();
606
await manager2.SetConnectionResultAsync(connection.ConnectionId, CompletionMessage.WithResult(invocation1.
InvocationId
, 5)).DefaultTimeout();
650
Assert.NotNull(invocation.
InvocationId
);
654
await manager1.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithResult(invocation.
InvocationId
, "wrong type")).DefaultTimeout();
src\aspnetcore\src\SignalR\common\testassets\Tests.Utils\TestClient.cs (3)
129
if (message is HubInvocationMessage hubInvocationMessage && !string.Equals(hubInvocationMessage.
InvocationId
, invocationId))
162
if (message is HubInvocationMessage hubInvocationMessage && !string.Equals(hubInvocationMessage.
InvocationId
, invocationId))
237
return message is HubInvocationMessage hubMessage ? hubMessage.
InvocationId
: null;
Microsoft.AspNetCore.SignalR.StackExchangeRedis (6)
RedisHubLifetimeManager.cs (3)
565
RedisLog.ErrorForwardingResult(_logger, completionMessage.
InvocationId
!, ex);
701
var invocationInfo = _clientResultsManager.RemoveInvocation(((CompletionMessage)hubMessage!).
InvocationId
!);
705
hubMessage = CompletionMessage.WithError(((CompletionMessage)hubMessage!).
InvocationId
!, $"Client result wasn't deserializable to {invocationInfo?.Type.Name}.");
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (3)
54
if (_pendingInvocations.TryGetValue(message.
InvocationId
!, out var item))
58
throw new InvalidOperationException($"Connection ID '{connectionId}' is not valid for invocation ID '{message.
InvocationId
}'.");
64
if (_pendingInvocations.Remove(message.
InvocationId
!, out _))