23 references to TryInvokeAsync
Aspire.Hosting.RemoteHost (1)
Ats\CapabilityDispatcher.cs (1)
560
var (found, result) = await _externalRegistry.
TryInvokeAsync
(
Aspire.Hosting.RemoteHost.Tests (22)
ExternalCapabilityRegistryTests.cs (22)
36
await registry.
TryInvokeAsync
("test.external/callback", new JsonObject { ["configure"] = "guest_callback" }, owner);
68
var invocation = registry.
TryInvokeAsync
("test.external/stall", null);
76
await Assert.ThrowsAsync<InvalidOperationException>(() => registry.
TryInvokeAsync
("test.external/stall", null));
113
Assert.Equal("configured", (await registry.
TryInvokeAsync
("test.external/value", null)).Result!.GetValue<string>());
198
await registry.
TryInvokeAsync
("test.external/callback", new JsonObject { ["configure"] = "guest_callback" }, guest.CallbackInvoker);
210
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => registry.
TryInvokeAsync
(
228
var invocation = registry.
TryInvokeAsync
("test.external/value", null, cancellationToken: cancellation.Token);
313
await registry.
TryInvokeAsync
("test.external/callback", new JsonObject { ["configure"] = "guest_callback" }, guestInvoker);
326
Assert.True((await registry.
TryInvokeAsync
(
372
await registry.
TryInvokeAsync
("test.external/callback", new JsonObject { ["configure"] = "guest_callback" }, guestInvoker);
477
var unavailable = await Assert.ThrowsAsync<InvalidOperationException>(() => registry.
TryInvokeAsync
("test.external/value", null));
507
() => registry.
TryInvokeAsync
("test.external/value", null));
512
Assert.Equal("replacement", (await registry.
TryInvokeAsync
("test.external/value", null)).Result!.GetValue<string>());
513
Assert.Equal("other", (await registry.
TryInvokeAsync
("test.external/other", null)).Result!.GetValue<string>());
544
await Assert.ThrowsAsync<InvalidOperationException>(() => registry.
TryInvokeAsync
("test.external/value", null));
572
await Assert.ThrowsAsync<InvalidOperationException>(() => registry.
TryInvokeAsync
("test.external/value", null));
619
Assert.Equal("first-replacement", (await registry.
TryInvokeAsync
("test.external/first", null)).Result!.GetValue<string>());
620
Assert.Equal("second-replacement", (await registry.
TryInvokeAsync
("test.external/second", null)).Result!.GetValue<string>());
636
var invocation = registry.
TryInvokeAsync
("test.external/callback",
679
var firstInvocation = registry.
TryInvokeAsync
("test.external/callback", firstArgs, firstOwner);
681
var secondInvocation = registry.
TryInvokeAsync
("test.external/callback", secondArgs, secondOwner);
724
await Assert.ThrowsAsync<RemoteInvocationException>(() => registry.
TryInvokeAsync
(