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