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