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