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