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