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