41 references to CreateProxy
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
343var proxy = _callbackProxyFactory.Value.CreateProxy(callbackId, callbackType, context.CallbackTimeout);
Aspire.Hosting.RemoteHost.Tests (40)
CallbackProxyTests.cs (38)
37var normal = Assert.IsType<Func<Task>>(factory.CreateProxy("shared", typeof(Func<Task>))); 38var extended = Assert.IsType<Func<Task>>(factory.CreateProxy("shared", typeof(Func<Task>), TimeSpan.FromSeconds(2))); 39var infinite = Assert.IsType<Func<Task>>(factory.CreateProxy("shared", typeof(Func<Task>), Timeout.InfiniteTimeSpan)); 41Assert.Same(normal, factory.CreateProxy("shared", typeof(Func<Task>))); 42Assert.Same(extended, factory.CreateProxy("shared", typeof(Func<Task>), TimeSpan.FromSeconds(2))); 43Assert.Same(infinite, factory.CreateProxy("shared", typeof(Func<Task>), Timeout.InfiniteTimeSpan)); 60Assert.IsType<Action>(factory.CreateProxy("sync", typeof(Action), timeout))(); 62Assert.Equal("result", Assert.IsType<Func<string>>(factory.CreateProxy("sync-result", typeof(Func<string>), timeout))()); 64await Assert.IsType<Func<Task>>(factory.CreateProxy("async", typeof(Func<Task>), timeout))(); 66Assert.Equal("result", await Assert.IsType<Func<Task<string>>>(factory.CreateProxy("async-result", typeof(Func<Task<string>>), timeout))()); 70Assert.IsType<TestSyncVoidCallbackWithDto>(factory.CreateProxy("sync-dto", typeof(TestSyncVoidCallbackWithDto), timeout))(dto); 72await Assert.IsType<TestAsyncVoidCallbackWithDto>(factory.CreateProxy("async-dto", typeof(TestAsyncVoidCallbackWithDto), timeout))(dto); 105factory.CreateProxy("configure-pool", typeof(Action<AksNodePoolConfig>))); 118var result = factory.CreateProxy("callback1", typeof(string)); 129var result = factory.CreateProxy("callback1", typeof(Action)); 140var result = factory.CreateProxy("callback1", typeof(TestCallbackNoArgs)); 151var result1 = factory.CreateProxy("callback1", typeof(TestCallbackNoArgs)); 152var result2 = factory.CreateProxy("callback1", typeof(TestCallbackNoArgs)); 166Assert.IsType<Action>(factory.CreateProxy("callback", typeof(Action))); 171Assert.Throws<ObjectDisposedException>(() => factory.CreateProxy("callback", typeof(Action))); 185Assert.IsType<Action>(factory.CreateProxy("callback", typeof(Action))); 205var proxy = (TestCallbackNoArgs)factory.CreateProxy("test-callback", typeof(TestCallbackNoArgs))!; 219var proxy = (TestCallbackWithIntResult)factory.CreateProxy("test-callback", typeof(TestCallbackWithIntResult))!; 250var result = factory.CreateProxy("callback1", typeof(TestCallbackWithString)); 262var proxy = (TestCallbackWithString)factory.CreateProxy("test-callback", typeof(TestCallbackWithString))!; 279var proxy = (TestCallbackWithMultipleParams)factory.CreateProxy("test-callback", typeof(TestCallbackWithMultipleParams))!; 305var proxy = (TestCallbackWithHandle)factory.CreateProxy("test-callback", typeof(TestCallbackWithHandle))!; 322var proxy = (TestCallbackWithStringResult)factory.CreateProxy("test-callback", typeof(TestCallbackWithStringResult))!; 336var proxy = (TestCallbackWithCancellation)factory.CreateProxy("test-callback", typeof(TestCallbackWithCancellation))!; 357var proxy = (TestCallbackWithOnlyCancellation)factory.CreateProxy("test-callback", typeof(TestCallbackWithOnlyCancellation))!; 379var proxy = (TestCallbackNoArgs)factory.CreateProxy("test-callback", typeof(TestCallbackNoArgs))!; 394var proxy = (TestCallbackWithIntResult)factory.CreateProxy("test-callback", typeof(TestCallbackWithIntResult))!; 409var proxy = (TestCallbackNoArgs)factory.CreateProxy("test-callback", typeof(TestCallbackNoArgs))!; 429var proxy = (TestSyncVoidCallbackWithDto)factory.CreateProxy("test-callback", typeof(TestSyncVoidCallbackWithDto))!; 451var proxy = (TestAsyncVoidCallbackWithDto)factory.CreateProxy("test-callback", typeof(TestAsyncVoidCallbackWithDto))!; 476var proxy = (TestSyncVoidCallbackWithMixedArgs)factory.CreateProxy("test-callback", typeof(TestSyncVoidCallbackWithMixedArgs))!; 494var proxy = (TestSyncVoidCallbackWithDto)factory.CreateProxy("test-callback", typeof(TestSyncVoidCallbackWithDto))!; 519var proxy = (TestSyncVoidCallbackWithMultipleDtos)factory.CreateProxy("test-callback", typeof(TestSyncVoidCallbackWithMultipleDtos))!;
CapabilityDispatcherTests.cs (1)
30var callback = Assert.IsType<Func<TestCancellationTokenContext?, Task>>(factory.CreateProxy(
JsonRpcCallbackInvokerTests.cs (1)
121var ordinary = Assert.IsType<Func<Task>>(factory.CreateProxy("ordinary", typeof(Func<Task>)))();