2 instantiations of NativeBackchannelReply
Aspire.Hosting.Native.Server (2)
Rpc\INativeBackchannelRpc.cs (2)
24new(JsonSerializer.SerializeToElement(value, typeInfo)); 27new(default, EncodeAsync(source, typeInfo));
43 references to NativeBackchannelReply
Aspire.Hosting.Native.Core.Tests (7)
NativeSocketIsolationTests.cs (5)
65? Task.FromException<NativeBackchannelReply>(exception) 66: Task.FromResult(NativeBackchannelReply.Value("ok", NativeCliJsonContext.Default.String))); 186NativeBackchannelReply.Value(new[] { "baseline.v2" }, NativeCliJsonContext.Default.StringArray))); 222return NativeBackchannelReply.Value("ready", NativeCliJsonContext.Default.String); 241NativeBackchannelReply.Value(request.Method == "large" ? new string('x', 4 * 1024 * 1024) : "ready",
TestServices\NativeSocketTestHost.cs (1)
25public NativeSocketTestHost(Func<NativeCliRequest, CancellationToken, Task<NativeBackchannelReply>> dispatch)
TestServices\RecordingBackchannelRpc.cs (1)
20Func<NativeCliRequest, CancellationToken, Task<NativeBackchannelReply>> dispatch,
Aspire.Hosting.Native.Server (36)
Auxiliary\NativeAuxiliaryBackchannel.cs (22)
70private async Task<NativeBackchannelReply> DispatchAsync(NativeCliRequest request, CancellationToken cancellationToken) 77return NativeBackchannelReply.Value(new NativeAuxiliaryCapabilities( 81return NativeBackchannelReply.Value(GetAppHostInformation(), json.NativeAuxiliaryAppHostInformation); 85return NativeBackchannelReply.Value(new NativeAuxiliaryAppHostInfo( 91return NativeBackchannelReply.Value(await _dashboard(cancellationToken).ConfigureAwait(false), 98return NativeBackchannelReply.Value(new NativeAuxiliaryDashboardInfo( 105return NativeBackchannelReply.Value((string?)null, NativeCliJsonContext.Default.String); 109return NativeBackchannelReply.Value(new NativeAuxiliaryReady(true), json.NativeAuxiliaryReady); 112return NativeBackchannelReply.Value(new NativeAuxiliaryResources(ReadSnapshots(resourcesRequest)), 116return NativeBackchannelReply.Value(ReadSnapshots(new()), json.NativeAuxiliaryResourceSnapshotArray); 119return NativeBackchannelReply.Streaming(WatchSnapshotsAsync(watchRequest, CancellationToken.None), json.NativeAuxiliaryResourceSnapshot); 122return NativeBackchannelReply.Streaming(WatchSnapshotsAsync(new(), CancellationToken.None), json.NativeAuxiliaryResourceSnapshot); 124return NativeBackchannelReply.Streaming( 128return NativeBackchannelReply.Streaming( 133return NativeBackchannelReply.Streaming(ReadLogsAsync(new() 141return NativeBackchannelReply.Streaming(_logs.ReadAsync(CancellationToken.None), NativeCliJsonContext.Default.NativeCliLogEntry); 143return NativeBackchannelReply.Value(await ExecuteCommandAsync( 147return NativeBackchannelReply.Value(await WaitForResourceAsync( 152return NativeBackchannelReply.Value(new NativeAuxiliaryEmptyResponse(), json.NativeAuxiliaryEmptyResponse) 156return NativeBackchannelReply.Value((string?)null, NativeCliJsonContext.Default.String) 160return NativeBackchannelReply.Value(new NativeAuxiliaryTerminalInfo(), json.NativeAuxiliaryTerminalInfo); 163return NativeBackchannelReply.Value(new NativeAuxiliaryTerminals(), json.NativeAuxiliaryTerminals);
Cli\NativeCliProtocol.cs (9)
72private async Task<NativeBackchannelReply> DispatchAsync(NativeCliRequest request, CancellationToken cancellationToken) 86return NativeBackchannelReply.Value(new NativePipelineSteps(steps.Select(step => 98return NativeBackchannelReply.Value(new[] { "baseline.v2", "pipeline-steps.v2" }, NativeCliJsonContext.Default.StringArray); 101return NativeBackchannelReply.Value((string?)null, NativeCliJsonContext.Default.String); 103return NativeBackchannelReply.Value((string?)null, NativeCliJsonContext.Default.String) with 110return NativeBackchannelReply.Streaming(_server.Publishing.ReadAsync(cancellationToken), 113return NativeBackchannelReply.Value(await _dashboard(cancellationToken).ConfigureAwait(false), 116return NativeBackchannelReply.Streaming(ResourceStatesAsync(cancellationToken), NativeCliJsonContext.Default.NativeCliResourceState); 118return NativeBackchannelReply.Streaming(_logs.ReadAsync(cancellationToken), NativeCliJsonContext.Default.NativeCliLogEntry);
Rpc\INativeBackchannelRpc.cs (3)
16Func<NativeCliRequest, CancellationToken, Task<NativeBackchannelReply>> dispatch, 23internal static NativeBackchannelReply Value<T>(T value, JsonTypeInfo<T> typeInfo) => 26internal static NativeBackchannelReply Streaming<T>(IAsyncEnumerable<T> source, JsonTypeInfo<T> typeInfo) =>
Rpc\NativeBackchannelRpc.cs (2)
23Func<NativeCliRequest, CancellationToken, Task<NativeBackchannelReply>> dispatch, CancellationToken cancellationToken) 89NativeBackchannelReply? reply = null;