3 instantiations of RpcResourceState
aspire (1)
BackchannelJsonSerializerContext.RpcResourceState.g.cs (1)
30
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.
RpcResourceState
(){ Resource = (string)args[0], Type = (string)args[1], State = (string)args[2], Endpoints = (string[])args[3], Health = (string)args[4] },
Aspire.Cli.Tests (2)
TestServices\TestAppHostBackchannel.cs (2)
80
yield return new
RpcResourceState
88
yield return new
RpcResourceState
86 references to RpcResourceState
aspire (82)
Backchannel\AppHostBackchannel.cs (4)
20
IAsyncEnumerable<
RpcResourceState
> GetResourceStatesAsync(CancellationToken cancellationToken);
85
public async IAsyncEnumerable<
RpcResourceState
> GetResourceStatesAsync([EnumeratorCancellation] CancellationToken cancellationToken)
92
var resourceStates = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<
RpcResourceState
>>(
99
await foreach (
var
state in resourceStates.WithCancellation(cancellationToken))
Backchannel\BackchannelJsonSerializerContext.cs (2)
18
[JsonSerializable(typeof(IAsyncEnumerable<
RpcResourceState
>))]
19
[JsonSerializable(typeof(MessageFormatterEnumerableTracker.EnumeratorResults<
RpcResourceState
>))]
BackchannelJsonSerializerContext.EnumeratorResultsRpcResourceState.g.cs (21)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>? _EnumeratorResultsRpcResourceState;
18
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>> EnumeratorResultsRpcResourceState
20
get => _EnumeratorResultsRpcResourceState ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>)Options.GetTypeInfo(typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>));
23
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>> Create_EnumeratorResultsRpcResourceState(global::System.Text.Json.JsonSerializerOptions options)
25
if (!TryGetTypeInfoForRuntimeCustomConverter<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>> jsonTypeInfo))
27
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
30
ObjectWithParameterizedConstructorCreator = static args => new global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>(){ Values = (global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>)args[0], Finished = (bool)args[1] },
36
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, objectInfo);
48
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
53
DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>),
55
Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)obj).Values,
65
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, info0);
72
DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>),
74
Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)obj).Finished,
92
private void EnumeratorResultsRpcResourceStateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>? value)
103
IReadOnlyListRpcResourceStateSerializeHandler(writer, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)value).Values);
104
writer.WriteBoolean(PropName_finished, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)value).Finished);
116
ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>),
BackchannelJsonSerializerContext.GetJsonTypeInfo.g.cs (4)
70
if (type == typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
))
98
if (type == typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>))
118
if (type == typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>))
142
if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>))
BackchannelJsonSerializerContext.IAsyncEnumerableRpcResourceState.g.cs (10)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>>? _IAsyncEnumerableRpcResourceState;
18
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>> IAsyncEnumerableRpcResourceState
20
get => _IAsyncEnumerableRpcResourceState ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>));
23
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>> Create_IAsyncEnumerableRpcResourceState(global::System.Text.Json.JsonSerializerOptions options)
25
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>> jsonTypeInfo))
27
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
33
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIAsyncEnumerableInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>, global::Aspire.Cli.Backchannel.
RpcResourceState
>(options, info);
BackchannelJsonSerializerContext.IReadOnlyListRpcResourceState.g.cs (12)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>? _IReadOnlyListRpcResourceState;
18
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>> IReadOnlyListRpcResourceState
20
get => _IReadOnlyListRpcResourceState ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>));
23
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>> Create_IReadOnlyListRpcResourceState(global::System.Text.Json.JsonSerializerOptions options)
25
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>> jsonTypeInfo))
27
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
33
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>, global::Aspire.Cli.Backchannel.
RpcResourceState
>(options, info);
43
private void IReadOnlyListRpcResourceStateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>? value)
53
foreach (global::Aspire.Cli.Backchannel.
RpcResourceState
element in value)
BackchannelJsonSerializerContext.RpcResourceState.g.cs (25)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
>? _RpcResourceState;
18
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
> RpcResourceState
20
get => _RpcResourceState ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
));
23
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
> Create_RpcResourceState(global::System.Text.Json.JsonSerializerOptions options)
25
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.
RpcResourceState
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
> jsonTypeInfo))
27
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.
RpcResourceState
>
36
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
>(options, objectInfo);
53
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
55
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Resource,
73
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
75
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Type,
93
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
95
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).State,
113
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
115
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Endpoints,
133
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
135
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Health,
152
private void RpcResourceStateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.
RpcResourceState
? value)
162
writer.WriteString(PropName_Resource, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Resource);
163
writer.WriteString(PropName_Type, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Type);
164
writer.WriteString(PropName_State, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).State);
166
StringArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Endpoints);
167
writer.WriteString(PropName_Health, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Health);
Commands\RunCommand.cs (4)
290
await foreach (
var
resourceState in resourceStates.WithCancellation(cancellationToken))
451
private readonly Dictionary<string,
RpcResourceState
> _resourceStates = new();
453
public void ProcessResourceState(
RpcResourceState
resourceState, Action<string, string> endpointWriter)
455
if (_resourceStates.TryGetValue(resourceState.Resource, out
var
existingResourceState))
Aspire.Cli.Tests (4)
Commands\PublishCommandPromptingIntegrationTests.cs (1)
856
public async IAsyncEnumerable<
RpcResourceState
> GetResourceStatesAsync([EnumeratorCancellation] CancellationToken cancellationToken)
TestServices\TestAppHostBackchannel.cs (3)
19
public Func<CancellationToken, IAsyncEnumerable<
RpcResourceState
>>? GetResourceStatesAsyncCallback { get; set; }
63
public async IAsyncEnumerable<
RpcResourceState
> GetResourceStatesAsync([EnumeratorCancellation]CancellationToken cancellationToken)
70
await foreach (
var
resourceState in resourceStates)