1 instantiation of NativeClient
Aspire.Hosting.Native.Client (1)
NativeClient.cs (1)
153client = new NativeClient(new NetworkStream(socket, ownsSocket: true), timeProvider);
300 references to NativeClient
Aspire.Hosting.Native.Client (154)
artifacts\obj\Aspire.Hosting.Native.Client\Debug\native-client\NativeClient.g.cs (136)
356public ApplicationExecution(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ApplicationExecution") { } 362var clientConnection = this.Client; 374var clientConnection = this.Client; 386var clientConnection = this.Client; 398var clientConnection = this.Client; 412var clientConnection = this.Client; 425public ApplicationObserver(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ApplicationObserver") { } 433var clientConnection = this.Client; 446var clientConnection = this.Client; 459var clientConnection = this.Client; 472var clientConnection = this.Client; 485var clientConnection = this.Client; 500var clientConnection = this.Client; 513public ApplicationRunLifetime(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ApplicationRunLifetime") { } 519var clientConnection = this.Client; 530public ApplicationWorkspace(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ApplicationWorkspace") { } 537var clientConnection = this.Client; 549var clientConnection = this.Client; 561var clientConnection = this.Client; 573var clientConnection = this.Client; 584var clientConnection = this.Client; 595var clientConnection = this.Client; 606public Composition(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.Composition") { } 614var clientConnection = this.Client; 630var clientConnection = this.Client; 646var clientConnection = this.Client; 662var clientConnection = this.Client; 679var clientConnection = this.Client; 694var clientConnection = this.Client; 710var clientConnection = this.Client; 727var clientConnection = this.Client; 742var clientConnection = this.Client; 758var clientConnection = this.Client; 772var clientConnection = this.Client; 784var clientConnection = this.Client; 796var clientConnection = this.Client; 807var clientConnection = this.Client; 818var clientConnection = this.Client; 829var clientConnection = this.Client; 840public CompositionSession(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.CompositionSession") { } 847var clientConnection = this.Client; 859var clientConnection = this.Client; 870public DeclaredResource(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredResource") { } 876var clientConnection = this.Client; 887var clientConnection = this.Client; 899var clientConnection = this.Client; 912var clientConnection = this.Client; 926var clientConnection = this.Client; 940var clientConnection = this.Client; 953var clientConnection = this.Client; 968var clientConnection = this.Client; 983var clientConnection = this.Client; 996var clientConnection = this.Client; 1009var clientConnection = this.Client; 1023var clientConnection = this.Client; 1036var clientConnection = this.Client; 1050var clientConnection = this.Client; 1066var clientConnection = this.Client; 1082var clientConnection = this.Client; 1096public DeclaredValue(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredValue") { } 1103var clientConnection = this.Client; 1115var clientConnection = this.Client; 1126public NativeApplicationServer(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.NativeApplicationServer") { } 1133var clientConnection = this.Client; 1145var clientConnection = this.Client; 1157var clientConnection = this.Client; 1170var clientConnection = this.Client; 1182var clientConnection = this.Client; 1193var clientConnection = this.Client; 1204var clientConnection = this.Client; 1216var clientConnection = this.Client; 1229var clientConnection = this.Client; 1242var clientConnection = this.Client; 1254var clientConnection = this.Client; 1269var clientConnection = this.Client; 1291var clientConnection = this.Client; 1309var clientConnection = this.Client; 1320public ResourceExecution(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ResourceExecution") { } 1328var clientConnection = this.Client; 1343var clientConnection = this.Client; 1358var clientConnection = this.Client; 1373var clientConnection = this.Client; 1386var clientConnection = this.Client; 1398var clientConnection = this.Client; 1410var clientConnection = this.Client; 1421var clientConnection = this.Client; 1432var clientConnection = this.Client; 1444var clientConnection = this.Client; 1458var clientConnection = this.Client; 1475var clientConnection = this.Client; 1492var clientConnection = this.Client; 1507var clientConnection = this.Client; 1524var clientConnection = this.Client; 1541var clientConnection = this.Client; 1555var clientConnection = this.Client; 1571var clientConnection = this.Client; 1587var clientConnection = this.Client; 1600var clientConnection = this.Client; 1616var clientConnection = this.Client; 1632var clientConnection = this.Client; 1645var clientConnection = this.Client; 1659var clientConnection = this.Client; 1672public ResourceLifecycleScope(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ResourceLifecycleScope") { } 1678var clientConnection = this.Client; 1691var clientConnection = this.Client; 1706var clientConnection = this.Client; 1719public RuntimeOperation(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.RuntimeOperation") { } 1725var clientConnection = this.Client; 1736public RpcArgsEditor(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcArgsEditor") { } 1743var clientConnection = this.Client; 1755public RpcBuilder(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcBuilder") { } 1763var clientConnection = this.Client; 1779var clientConnection = this.Client; 1795var clientConnection = this.Client; 1808var clientConnection = this.Client; 1819var clientConnection = this.Client; 1830public RpcEndpoint(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcEndpoint") { } 1837var clientConnection = this.Client; 1849public RpcEnvironmentEditor(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcEnvironmentEditor") { } 1857var clientConnection = this.Client; 1870public RpcResource(NativeClient client, JsonElement handle) : base(client, handle, "Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Authoring.RpcResource") { } 1877var clientConnection = this.Client; 1889var clientConnection = this.Client; 1901var clientConnection = this.Client; 1914var clientConnection = this.Client; 1927var clientConnection = this.Client; 1940var clientConnection = this.Client; 1967var clientConnection = this.Client; 1980var clientConnection = this.Client; 1994var clientConnection = this.Client; 2008var clientConnection = this.Client; 2035var clientConnection = this.Client; 2048var clientConnection = this.Client; 2062var clientConnection = this.Client; 2078public static async Task<CompositionSession> CreateSessionAsync(NativeClient client, CancellationToken cancellationToken = default) 2080var clientConnection = client;
Authoring\NativeApplication.cs (2)
129private NativeClient? _client; 173_client = await NativeClient.ConnectAsync(IPEndPoint.Parse(endpoint), token, TimeSpan.FromSeconds(15),
Authoring\Publishing.cs (1)
78public async Task<PublishingContext> PublishAsync(NativeClient client, string outputPath, string environmentName,
NativeClient.cs (2)
131public static async Task<NativeClient> ConnectAsync(EndPoint endpoint, string authenticationToken, 149NativeClient? client = null;
NativeProviderDefinition.cs (7)
41public sealed class NativeProviderContext(NativeClient client) 46private readonly AsyncLocal<NativeClient.ProviderInvocation?> _invocation = new(); 51internal void SetInvocation(NativeClient.ProviderInvocation invocation) 60internal void CompleteInvocation(NativeClient.ProviderInvocation invocation) 73public NativeClient Client { get; } = client; 162NativeClient.ProviderInvocation[] active; 203public HashSet<NativeClient.ProviderInvocation> Invocations { get; } = [];
NativeProviderHost.cs (4)
32var connected = await NativeClient.ConnectAsync(endpoint, token, TimeSpan.FromSeconds(15), clock, cancellationToken).ConfigureAwait(false); 34var client = connected; 84public static async Task<NativeProviderActivation> StartAsync(NativeClient client, string packageName,
NativeRemoteObject.cs (2)
13public NativeClient Client { get; } 18protected NativeRemoteObject(NativeClient client, JsonElement handle, string expectedType)
Aspire.Hosting.Native.Core.Tests (132)
NativeBuilderAuthoringTests.cs (6)
110await using var native = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 216await using var native = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 243await using var native = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System);
NativeComposeCSharpTests.cs (14)
23await using var client = await ConnectAsync(host); 68await using var client = await ConnectAsync(host); 178await using var client = await ConnectAsync(host); 230await using var client = await ConnectAsync(host); 285await using var client = await ConnectAsync(host); 310await using var client = await ConnectAsync(host); 332await using var client = await ConnectAsync(host); 370await using var client = await ConnectAsync(host); 415await using var client = await ConnectAsync(host); 435await using var client = await ConnectAsync(host); 463await using var client = await ConnectAsync(host); 522private static Task<NativeClient> ConnectAsync(NativeClientTestHost host) => 523NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System, TestContext.Current.CancellationToken); 525private static async Task<(PublishingContext Context, DistributedApplicationBuilder Builder)> ExportAsync(NativeClient client, string root)
NativeCSharpClientTests.cs (18)
21var clientAssembly = typeof(NativeClient).Assembly; 31expected = new[] { typeof(NativeClient) }.Concat(expected); 55.Count(method => method.Name.EndsWith("Async", StringComparison.Ordinal) && type != typeof(NativeClient)))); 67await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 100await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 141NativeClient.ConnectAsync(host.Endpoint, "wrong-token", TimeSpan.FromSeconds(10), TimeProvider.System)); 142await using var first = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 143await using var second = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 159await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 179var connecting = NativeClient.ConnectAsync(listener.LocalEndpoint, "test-authentication-token", 192await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 208await Assert.ThrowsAsync<ArgumentException>(() => NativeClient.ConnectAsync(
NativeIpcSecurityTests.cs (2)
135await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(15),
NativeProviderActivationTests.cs (4)
16await using var client = await NativeClient.ConnectAsync(host.Endpoint, "test-token", 46await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token,
NativeProviderClientTests.cs (36)
21await using var app = await ConnectAsync(host); 27await using var provider = await ConnectAsync(host); 53await using var app = await ConnectAsync(host); 80await using var app = await ConnectAsync(host); 81await using var foreign = await ConnectAsync(host); 98await using var app = await ConnectAsync(host); 124await using var app = await ConnectAsync(host); 157await using var app = await ConnectAsync(host); 158await using var provider = await ConnectAsync(host); 176await using var foreign = await ConnectAsync(host); 190await using var app = await ConnectAsync(host); 191var provider = await ConnectAsync(host); 194await using var replay = await ConnectAsync(host); 212await using var app = await ConnectAsync(host); 213await using var provider = await ConnectAsync(host); 240await using var app = await ConnectAsync(host); 241await using var first = await ConnectAsync(host); 245await using var duplicate = await ConnectAsync(host); 260await using var app = await ConnectAsync(host); 261await using var provider = await ConnectAsync(host); 288await using var app = await ConnectAsync(host); 289await using var provider = await ConnectAsync(host); 344await using var app = await ConnectAsync(host); 345await using var provider = await ConnectAsync(host); 417await using var app = await ConnectAsync(host); 418await using var provider = await ConnectAsync(host); 455await using var app = await ConnectAsync(host); 456var provider = await ConnectAsync(host); 474await using var app = await ConnectAsync(host); 475await using var provider = await ConnectAsync(host); 496private static Task<NativeClient> ConnectAsync(NativeClientTestHost host) => 497NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 503await using var app = await ConnectAsync(host); 504await using var provider = await ConnectAsync(host); 544await using var app = await ConnectAsync(host); 545await using var provider = await ConnectAsync(host);
NativeProviderLifecycleTests.cs (33)
29await using var app = await ConnectAsync(host); 30await using var provider = await ConnectAsync(host); 55await using var app = await ConnectAsync(host); 56await using var provider = await ConnectAsync(host); 126await using var app = await ConnectAsync(host); 128var provider = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(15), 229await using var app = await ConnectAsync(host); 230await using var provider = await ConnectAsync(host); 261await using var app = await ConnectAsync(host); 262await using var provider = await ConnectAsync(host); 313await using var app = await ConnectAsync(host); 314await using var provider = await ConnectAsync(host); 357await using var app = await ConnectAsync(host); 358await using var provider = await ConnectAsync(host); 394await using var app = await ConnectAsync(host); 395var provider = await ConnectAsync(host); 428await using var app = await ConnectAsync(host); 429await using var provider = await ConnectAsync(host); 457await using var app = await ConnectAsync(host); 458await using var provider = await ConnectAsync(host); 489await using var app = await ConnectAsync(host); 490await using var provider = await ConnectAsync(host); 519await using var app = await ConnectAsync(host); 520await using var provider = await ConnectAsync(host); 578await using var app = await ConnectAsync(host); 579await using var provider = await ConnectAsync(host); 616var app = await ConnectAsync(host); 617await using var provider = await ConnectAsync(host); 643private static Task<NativeClient> ConnectAsync(NativeClientTestHost host) => 644NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(15), TimeProvider.System); 646private static async Task RegisterAsync(NativeClient app, NativeClient provider, LifecycleProviderTestIntegration integration) =>
NativeRpcAuthoringTests.cs (11)
23await using var client = await ConnectAsync(host); 83await using var client = await ConnectAsync(host); 120await using var client = await ConnectAsync(host); 151await using var client = await ConnectAsync(host); 185await using var client = await ConnectAsync(host); 186await using var foreign = await ConnectAsync(host); 214await using var client = await ConnectAsync(host); 253await using var app = await ConnectAsync(host); 254await using var provider = await ConnectAsync(host); 315private static Task<NativeClient> ConnectAsync(NativeClientTestHost host) => 316NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System);
NativeSymbolicValueClientTests.cs (6)
15await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 51await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System); 88await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(10), TimeProvider.System);
NativeSymbolicWorkloadSocketTests.cs (2)
26await using var client = await NativeClient.ConnectAsync(host.Endpoint, host.Token, TimeSpan.FromSeconds(15), clock, token);
NativeIntegrations.AppHost.Sample (2)
Program.cs (2)
13await using var client = await NativeClient.ConnectAsync(endpoint, token, TimeSpan.FromSeconds(15), clock);
NativeIntegrations.Contracts (4)
artifacts\obj\NativeIntegrations.Contracts\Debug\provider-contract\ProviderContract.g.cs (4)
38var client = composition.Client; 49internal ExternalApiResourceClient(NativeClient client, JsonElement handle) : base(client, handle, "example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource") { } 52var client = Client; 61var client = Client;
NativeIntegrations.DockerCompose.AppHost.Sample (2)
Program.cs (2)
62await using var client = await NativeClient.ConnectAsync(IPEndPoint.Parse(endpoint), token, TimeSpan.FromSeconds(15), TimeProvider.System);
NativeIntegrations.Redis.Contracts (6)
artifacts\obj\NativeIntegrations.Redis.Contracts\Debug\provider-contract\ProviderContract.g.cs (6)
68var client = composition.Client; 79internal RedisResourceClient(NativeClient client, JsonElement handle) : base(client, handle, "example.csharp.redis/NativeIntegrations.Redis.RedisResource") { } 82var client = Client; 90var client = Client; 98var client = Client; 107var client = Client;