12 instantiations of JsonRpcCallbackInvoker
Aspire.Hosting.RemoteHost.Tests (12)
CallbackProxyTests.cs (2)
63using var invoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 80using var invoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance);
ExternalCapabilityRegistryTests.cs (7)
34using var owner = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 309await using var guestInvoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance, configuration, clock); 366await using var guestInvoker = new JsonRpcCallbackInvoker( 637new JsonObject { ["configure"] = "guest_callback" }, new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance)); 672using var firstOwner = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 673using var secondOwner = sameGuest ? firstOwner : new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 723using var owner = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance);
JsonRpcCallbackInvokerTests.cs (2)
34await using var invoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance, configuration, clock); 72await using var invoker = new JsonRpcCallbackInvoker(
TestServices\IntegrationHostTestConnection.cs (1)
68public JsonRpcCallbackInvoker CallbackInvoker { get; } = new(
45 references to JsonRpcCallbackInvoker
Aspire.Hosting.RemoteHost (20)
Ats\AtsCallbackProxyFactory.cs (1)
61if (_invoker is JsonRpcCallbackInvoker rpcInvoker)
Ats\CapabilityDispatcher.cs (1)
546string capabilityId, JsonObject? args, JsonRpcCallbackInvoker? ownerInvoker = null, CancellationToken cancellationToken = default)
Ats\ExternalCapabilityRegistry.cs (10)
31private readonly ConcurrentDictionary<JsonRpc, JsonRpcCallbackInvoker> _integrationCallbackInvokers = new(); 115public void AddIntegrationHost(string registrationId, JsonRpc clientRpc, JsonRpcCallbackInvoker callbackInvoker) 147var hasCallbacks = (_integrationCallbackInvokers.TryGetValue(clientRpc, out var invoker) && 320if ((_integrationCallbackInvokers.TryGetValue(previous, out var invoker) && invoker.StopAcceptingCallbacks()) || 445string capabilityId, JsonObject? args, JsonRpcCallbackInvoker? ownerInvoker = null, CancellationToken cancellationToken = default) 549public (JsonRpcCallbackInvoker Invoker, string CallbackId)? ResolveCallbackOwner(string callbackId) 613internal void RemoveGuestCallbacks(JsonRpcCallbackInvoker invoker) 634private void RegisterCallbackOwners(ExternalCapabilityRegistration registration, JsonObject? args, JsonRpcCallbackInvoker? ownerInvoker, string invocationId) 656if (_integrationCallbackInvokers.TryGetValue(registration.ClientRpc, out var hostInvoker)) 831JsonRpc Host, JsonRpcCallbackInvoker Invoker, string CallbackId, string InvocationId, string CapabilityId);
JsonRpcCallbackInvoker.cs (3)
24private readonly ILogger<JsonRpcCallbackInvoker> _logger; 29public JsonRpcCallbackInvoker(ILogger<JsonRpcCallbackInvoker> logger) 35public JsonRpcCallbackInvoker(ILogger<JsonRpcCallbackInvoker> logger, IntegrationHostConfiguration configuration, TimeProvider timeProvider)
RemoteAppHostService.cs (3)
16private readonly JsonRpcCallbackInvoker _callbackInvoker; 28JsonRpcCallbackInvoker callbackInvoker, 217/// via the owning scope's <see cref="JsonRpcCallbackInvoker"/>.
RemoteHostServer.cs (2)
121services.AddScoped<JsonRpcCallbackInvoker>(); 122services.AddScoped<ICallbackInvoker>(sp => sp.GetRequiredService<JsonRpcCallbackInvoker>());
Aspire.Hosting.RemoteHost.Tests (25)
CallbackProxyTests.cs (4)
63using var invoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 80using var invoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance);
ExternalCapabilityRegistryTests.cs (13)
34using var owner = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 309await using var guestInvoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance, configuration, clock); 366await using var guestInvoker = new JsonRpcCallbackInvoker( 367NullLogger<JsonRpcCallbackInvoker>.Instance, configuration, clock); 637new JsonObject { ["configure"] = "guest_callback" }, new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance)); 672using var firstOwner = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 673using var secondOwner = sameGuest ? firstOwner : new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance); 723using var owner = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance);
JsonRpcAuthenticationTests.cs (2)
286services.AddScoped<JsonRpcCallbackInvoker>(); 287services.AddScoped<ICallbackInvoker>(sp => sp.GetRequiredService<JsonRpcCallbackInvoker>());
JsonRpcCallbackInvokerTests.cs (4)
34await using var invoker = new JsonRpcCallbackInvoker(NullLogger<JsonRpcCallbackInvoker>.Instance, configuration, clock); 72await using var invoker = new JsonRpcCallbackInvoker( 73NullLogger<JsonRpcCallbackInvoker>.Instance, IntegrationHostConfiguration.Default, new FakeTimeProvider());
TestServices\IntegrationHostTestConnection.cs (2)
68public JsonRpcCallbackInvoker CallbackInvoker { get; } = new( 69NullLogger<JsonRpcCallbackInvoker>.Instance,