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