10 instantiations of NativeRpcConnection
Aspire.Hosting.Native.Core.AotSmoke (1)
Program.cs (1)
22
using var connection = new
NativeRpcConnection
(token);
Aspire.Hosting.Native.Core.Tests (8)
NativeCliControlTests.cs (1)
78
using var connection = new
NativeRpcConnection
(Token);
NativeRpcTests.cs (3)
179
using var connection = new
NativeRpcConnection
(Token);
187
var connection = new
NativeRpcConnection
(Token);
200
using var connection = new
NativeRpcConnection
(Token);
TestServices\RpcTestClient.cs (4)
18
public RpcTestClient(bool authenticate) : this(new
NativeRpcConnection
(Token), authenticate)
22
public RpcTestClient(NativeApplicationServer server) : this(new
NativeRpcConnection
(Token, server), authenticate: true)
27
: this(new
NativeRpcConnection
(Token, server, languages: null, options), authenticate: true)
32
: this(new
NativeRpcConnection
(Token, server, languages), authenticate: true)
Aspire.Hosting.Native.Server (1)
Rpc\NativeRpcListener.cs (1)
189
using var connection = new
NativeRpcConnection
(_token, _server, _languages, _options, _logger);
57 references to NativeRpcConnection
Aspire.Hosting.Native.Core.AotSmoke (1)
Program.cs (1)
22
using
var
connection = new NativeRpcConnection(token);
Aspire.Hosting.Native.Core.Tests (9)
NativeCliControlTests.cs (1)
78
using
var
connection = new NativeRpcConnection(Token);
NativeProviderProtocolTests.cs (3)
128
var contract = new NativeProviderContractProjection(NativeProviderMetadata.ReadCoreContract(
NativeRpcConnection
.CoreContract));
151
var contract = new NativeProviderContractProjection(NativeProviderMetadata.ReadCoreContract(
NativeRpcConnection
.CoreContract));
157
new NativeProviderContractProjection(NativeProviderMetadata.ReadCoreContract(
NativeRpcConnection
.CoreContract))
NativeRpcTests.cs (3)
179
using
var
connection = new NativeRpcConnection(Token);
187
var
connection = new NativeRpcConnection(Token);
200
using
var
connection = new NativeRpcConnection(Token);
TestServices\RpcTestClient.cs (2)
36
private RpcTestClient(
NativeRpcConnection
connection, bool authenticate)
45
public
NativeRpcConnection
Connection { get; }
Aspire.Hosting.Native.Server (47)
artifacts\obj\Aspire.Hosting.Native.Server\Debug\native-ats\NativeDispatch.g.cs (2)
12
public static async Task<JsonNode?> InvokeAsync(NativeApplicationServer server, NativeHandles handles,
NativeRpcConnection
connection,
NativeRpcConnection
callbackConnection, string capability, JsonObject arguments)
Rpc\NativeProviderLifecycle.cs (5)
14
private PublishedResource TrackProviderObject(Registration registration,
NativeRpcConnection
owner, string id,
64
var
connection = registration.Connection;
124
NativeRpcConnection
? connection;
166
NativeRpcConnection
owner, DeclaredResource declaration, string objectId, string typeId) : IProviderResourceRetirement
171
internal
NativeRpcConnection
Owner { get; } = owner;
Rpc\NativeProviderRegistry.cs (34)
16
string Expect(
NativeRpcConnection
owner, string packageName);
17
Task RegisterAsync(
NativeRpcConnection
connection, string authority, INativeRpcPeer peer);
18
Task WaitRegistrationAsync(
NativeRpcConnection
owner, string authority);
19
bool AbandonRegistration(
NativeRpcConnection
owner, string authority);
20
bool IsProvider(
NativeRpcConnection
connection);
22
Task<JsonNode?> InvokeAsync(
NativeRpcConnection
caller, string capability, JsonObject arguments);
23
Task<JsonNode?> InvokeCoreAsync(
NativeRpcConnection
provider, string capability, JsonObject arguments);
24
Task<JsonNode?> InvokeCallbackAsync(
NativeRpcConnection
provider, string callback, JsonObject arguments);
25
void Disconnect(
NativeRpcConnection
connection);
34
private readonly Dictionary<
NativeRpcConnection
, Registration> _providers = new(ReferenceEqualityComparer.Instance);
39
public string Expect(
NativeRpcConnection
owner, string packageName)
66
public async Task RegisterAsync(
NativeRpcConnection
connection, string authority, INativeRpcPeer peer)
121
public async Task WaitRegistrationAsync(
NativeRpcConnection
owner, string authority)
149
public bool AbandonRegistration(
NativeRpcConnection
owner, string authority)
170
public bool IsProvider(
NativeRpcConnection
connection)
191
public async Task<JsonNode?> InvokeAsync(
NativeRpcConnection
caller, string capability, JsonObject arguments)
281
public async Task<JsonNode?> InvokeCoreAsync(
NativeRpcConnection
provider, string capability, JsonObject arguments)
293
NativeRpcConnection
? origin = null;
355
public async Task<JsonNode?> InvokeCallbackAsync(
NativeRpcConnection
provider, string callbackId, JsonObject arguments)
381
private JsonNode? ToProvider(Registration registration,
NativeRpcConnection
caller, JsonNode? value, NativeProviderType type,
409
private JsonNode? ToCaller(Registration registration,
NativeRpcConnection
caller, JsonNode? value, NativeProviderType type,
453
public void Disconnect(
NativeRpcConnection
connection)
492
internal sealed class Registration(
NativeRpcConnection
owner,
NativeRpcConnection
connection, INativeRpcPeer peer,
495
private
NativeRpcConnection
? _owner = owner;
496
private
NativeRpcConnection
? _connection = connection;
498
public
NativeRpcConnection
Owner => _owner ?? throw Unavailable();
499
public
NativeRpcConnection
Connection => _connection ?? throw Unavailable();
510
public bool Matches(
NativeRpcConnection
candidate) =>
529
private sealed record Expectation(
NativeRpcConnection
Owner, string PackageName, long Created)
537
internal sealed record DelegatedCoreReference(
NativeRpcConnection
Owner, JsonObject Handle) : ICapabilityLifetime
542
internal sealed record ProviderResourceReference(NativeProviderRegistry.Registration Provider,
NativeRpcConnection
Owner,
548
internal sealed record ProviderCallback(
NativeRpcConnection
Owner, string Id, NativeProviderCallback Signature)
555
internal sealed class ProviderCallbackLease(
NativeRpcConnection
connection, string id, ProviderCallback callback) : IDisposable
Rpc\NativeRpcConnection.cs (4)
38
private readonly Dictionary<(
NativeRpcConnection
, string, string), object> _proxyReferences = [];
181
internal Func<T, Task> CreateAuthoringCallback<T>(
NativeRpcConnection
callbackConnection, string callbackId, string typeId) where T : class =>
211
internal async Task<JsonNode?> InvokeCoreAsync(string capability, JsonObject arguments,
NativeRpcConnection
callbackConnection)
541
using var stream = typeof(
NativeRpcConnection
).Assembly.GetManifestResourceStream("Aspire.Hosting.Native.Rpc.contract.json")
Rpc\NativeRpcListener.cs (2)
54
new NativeRpcPeerFactory(options, logger), new NativeProviderRegistry(
NativeRpcConnection
.CoreContract, options, logger))
189
using
var
connection = new NativeRpcConnection(_token, _server, _languages, _options, _logger);