3 instantiations of RpcResourceState
aspire (1)
BackchannelJsonSerializerContext.RpcResourceState.g.cs (1)
32
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
96 references to RpcResourceState
aspire (92)
Backchannel\AppHostBackchannel.cs (4)
20
IAsyncEnumerable<
RpcResourceState
> GetResourceStatesAsync(CancellationToken cancellationToken);
86
public async IAsyncEnumerable<
RpcResourceState
> GetResourceStatesAsync([EnumeratorCancellation] CancellationToken cancellationToken)
93
var resourceStates = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<
RpcResourceState
>>(
100
await foreach (
var
state in resourceStates.WithCancellation(cancellationToken))
Backchannel\BackchannelJsonSerializerContext.cs (2)
19
[JsonSerializable(typeof(IAsyncEnumerable<
RpcResourceState
>))]
20
[JsonSerializable(typeof(MessageFormatterEnumerableTracker.EnumeratorResults<
RpcResourceState
>))]
BackchannelJsonSerializerContext.EnumeratorResultsRpcResourceState.g.cs (25)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>? _EnumeratorResultsRpcResourceState;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>> EnumeratorResultsRpcResourceState
22
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
>));
25
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)
27
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))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
32
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] },
35
ConstructorAttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, objectInfo);
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
56
DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>),
58
Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)obj).Values,
66
AttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>).GetProperty("Values", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>(options, info0);
76
DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>),
78
Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)obj).Finished,
86
AttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>).GetProperty("Finished", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
97
private void EnumeratorResultsRpcResourceStateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>? value)
108
IReadOnlyListRpcResourceStateSerializeHandler(writer, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)value).Values);
109
writer.WriteBoolean(PropName_finished, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>)value).Finished);
119
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
))
102
if (type == typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.
RpcResourceState
>))
122
if (type == typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>))
146
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;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>> IAsyncEnumerableRpcResourceState
22
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
>));
25
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)
27
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))
29
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
35
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;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>> IReadOnlyListRpcResourceState
22
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
>));
25
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)
27
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))
29
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>>
35
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);
45
private void IReadOnlyListRpcResourceStateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.
RpcResourceState
>? value)
55
foreach (global::Aspire.Cli.Backchannel.
RpcResourceState
element in value)
BackchannelJsonSerializerContext.RpcResourceState.g.cs (31)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
>? _RpcResourceState;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
> RpcResourceState
22
get => _RpcResourceState ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
> Create_RpcResourceState(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.
RpcResourceState
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.
RpcResourceState
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Backchannel.
RpcResourceState
>(options, objectInfo);
56
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
58
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Resource,
66
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
).GetProperty("Resource", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
81
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Type,
89
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
).GetProperty("Type", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
102
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
104
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).State,
112
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
).GetProperty("State", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
125
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
127
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Endpoints,
135
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
).GetProperty("Endpoints", InstanceMemberBindingFlags, null, typeof(string[]), global::System.Array.Empty<global::System.Type>(), null),
148
DeclaringType = typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
),
150
Getter = static obj => ((global::Aspire.Cli.Backchannel.
RpcResourceState
)obj).Health,
158
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.
RpcResourceState
).GetProperty("Health", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
168
private void RpcResourceStateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.
RpcResourceState
? value)
178
writer.WriteString(PropName_Resource, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Resource);
179
writer.WriteString(PropName_Type, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Type);
180
writer.WriteString(PropName_State, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).State);
182
StringArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Endpoints);
183
writer.WriteString(PropName_Health, ((global::Aspire.Cli.Backchannel.
RpcResourceState
)value).Health);
Commands\RunCommand.cs (4)
290
await foreach (
var
resourceState in resourceStates.WithCancellation(cancellationToken))
459
private readonly Dictionary<string,
RpcResourceState
> _resourceStates = new();
461
public void ProcessResourceState(
RpcResourceState
resourceState, Action<string, string> endpointWriter)
463
if (_resourceStates.TryGetValue(resourceState.Resource, out
var
existingResourceState))
Aspire.Cli.Tests (4)
Commands\PublishCommandPromptingIntegrationTests.cs (1)
867
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)