1 write to ServerRpc
Aspire.Hosting.RemoteHost.Tests (1)
TestServices\IntegrationHostTestConnection.cs (1)
43
ServerRpc
= new JsonRpc(new HeaderDelimitedMessageHandler(serverStream, serverStream, new SystemTextJsonFormatter()));
101 references to ServerRpc
Aspire.Hosting.RemoteHost.Tests (101)
ExternalCapabilityRegistryTests.cs (90)
32
registry.AddIntegrationHost(connection.
ServerRpc
);
40
Assert.True(registry.MarkHostUnavailable(connection.
ServerRpc
));
41
Assert.True(registry.MarkHostUnavailable(connection.
ServerRpc
));
66
registry.AddIntegrationHost(connection.
ServerRpc
);
75
await connection.
ServerRpc
.Completion.WaitAsync(TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
87
Assert.All(states, state => Assert.Equal(connection.
ServerRpc
.GetHashCode(), state["Host"]));
110
registry.AddIntegrationHost(connection.
ServerRpc
);
125
registry.AddIntegrationHost(connection.
ServerRpc
);
162
registry.AddIntegrationHost(connection.
ServerRpc
);
196
registry.AddIntegrationHost(integration.
ServerRpc
);
201
var result = await registry.InvokeGuestCallbackAsync(integration.
ServerRpc
, relayId,
205
guest.
ServerRpc
, relayId, null, TestContext.Current.CancellationToken));
209
integration.
ServerRpc
, relayId, null, TestContext.Current.CancellationToken));
225
registry.AddIntegrationHost(integration.
ServerRpc
);
234
await integration.
ServerRpc
.Completion.WaitAsync(TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
258
registry.AddIntegrationHost(integration.
ServerRpc
);
276
await integration.
ServerRpc
.Completion.WaitAsync(TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
310
guestInvoker.SetConnection(guest.
ServerRpc
);
311
registry.AddIntegrationHost(integration.
ServerRpc
);
315
var invocation = registry.InvokeGuestCallbackAsync(integration.
ServerRpc
, relayId, null, TestContext.Current.CancellationToken);
368
guestInvoker.SetConnection(guest.
ServerRpc
);
370
registry.AddIntegrationHost("integration", integration.
ServerRpc
, integration.CallbackInvoker);
376
var invocation = registry.InvokeGuestCallbackAsync(integration.
ServerRpc
, relayId, null, TestContext.Current.CancellationToken);
403
await integration.
ServerRpc
.Completion.WaitAsync(TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
404
await guest.
ServerRpc
.Completion.WaitAsync(TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
406
Assert.True(registry.MarkHostUnavailable(integration.
ServerRpc
));
409
integration.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken));
424
Assert.Throws<InvalidOperationException>(() => registry.AddIntegrationHost("unknown", connection.
ServerRpc
, connection.CallbackInvoker));
426
registry.AddIntegrationHost("attempt", connection.
ServerRpc
, connection.CallbackInvoker);
427
Assert.Same(connection.
ServerRpc
, await registration);
428
Assert.Throws<InvalidOperationException>(() => registry.AddIntegrationHost("attempt", connection.
ServerRpc
, connection.CallbackInvoker));
442
Assert.Throws<InvalidOperationException>(() => registry.AddIntegrationHost("old", connection.
ServerRpc
, connection.CallbackInvoker));
444
registry.AddIntegrationHost("replacement", connection.
ServerRpc
, connection.CallbackInvoker);
445
Assert.Same(connection.
ServerRpc
, await replacement);
456
registry.AddIntegrationHost("original", original.
ServerRpc
, original.CallbackInvoker);
457
Assert.Same(original.
ServerRpc
, await registration);
464
Assert.Equal(ownsCallbacks, registry.MarkHostUnavailable(original.
ServerRpc
));
465
Assert.Equal(ownsCallbacks, registry.MarkHostUnavailable(original.
ServerRpc
));
468
registry.AddIntegrationHost(replacement.
ServerRpc
);
472
original.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken));
486
original.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
501
registry.AddIntegrationHost(original.
ServerRpc
);
502
registry.AddIntegrationHost(other.
ServerRpc
);
504
registry.MarkHostUnavailable(original.
ServerRpc
);
509
registry.AddIntegrationHost(replacement.
ServerRpc
);
510
await registry.ReplaceHostAsync(original.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken);
531
registry.AddIntegrationHost(original.
ServerRpc
);
533
registry.MarkHostUnavailable(original.
ServerRpc
);
534
registry.AddIntegrationHost(replacement.
ServerRpc
);
537
original.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken));
557
registry.AddIntegrationHost(original.
ServerRpc
);
559
registry.MarkHostUnavailable(original.
ServerRpc
);
560
registry.AddIntegrationHost(replacement.
ServerRpc
);
563
original.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken));
582
registry.AddIntegrationHost(original.
ServerRpc
);
584
registry.MarkHostUnavailable(original.
ServerRpc
);
588
original.
ServerRpc
, replacement.
ServerRpc
, TimeSpan.Zero, TestContext.Current.CancellationToken));
607
registry.AddIntegrationHost(first.
ServerRpc
);
608
registry.AddIntegrationHost(second.
ServerRpc
);
610
registry.MarkHostUnavailable(first.
ServerRpc
);
611
registry.MarkHostUnavailable(second.
ServerRpc
);
612
registry.AddIntegrationHost(firstReplacement.
ServerRpc
);
613
registry.AddIntegrationHost(secondReplacement.
ServerRpc
);
616
registry.ReplaceHostAsync(first.
ServerRpc
, firstReplacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken),
617
registry.ReplaceHostAsync(second.
ServerRpc
, secondReplacement.
ServerRpc
, TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken));
634
registry.AddIntegrationHost(connection.
ServerRpc
);
669
registry.AddIntegrationHost(connection.
ServerRpc
);
720
registry.AddIntegrationHost(connection.
ServerRpc
);
747
registry.AddIntegrationHost(connection.
ServerRpc
);
773
registry.AddIntegrationHost(connection.
ServerRpc
);
803
registry.AddIntegrationHost(connection.
ServerRpc
);
821
registry.AddIntegrationHost(connection.
ServerRpc
);
822
registry.AddIntegrationHost(successfulConnection.
ServerRpc
);
844
registry.AddIntegrationHost(firstConnection.
ServerRpc
);
847
registry.AddIntegrationHost(secondConnection.
ServerRpc
);
870
registry.AddIntegrationHost(firstConnection.
ServerRpc
);
872
registry.AddIntegrationHost(secondConnection.
ServerRpc
);
887
registry.AddIntegrationHost(connection.
ServerRpc
);
912
registry.AddIntegrationHost(firstConnection.
ServerRpc
);
913
registry.AddIntegrationHost(secondConnection.
ServerRpc
);
949
registry.AddIntegrationHost(connection.
ServerRpc
);
IntegrationHostLauncherTests.cs (5)
116
registry.AddIntegrationHost(firstConnection.
ServerRpc
);
123
registry.AddIntegrationHost(secondConnection.
ServerRpc
);
141
registry.AddIntegrationHost(connection.
ServerRpc
);
161
registry.AddIntegrationHost(connection.
ServerRpc
);
162
registry.MarkHostUnavailable(connection.
ServerRpc
);
JsonRpcCallbackInvokerTests.cs (3)
35
invoker.SetConnection(connection.
ServerRpc
);
46
await connection.
ServerRpc
.Completion.WaitAsync(TestContext.Current.CancellationToken);
74
invoker.SetConnection(connection.
ServerRpc
);
TestServices\IntegrationHostTestConnection.cs (3)
44
CallbackInvoker.SetConnection(
ServerRpc
);
63
ServerRpc
.StartListening();
77
ServerRpc
.Dispose();