12 instantiations of ResourceSnapshot
aspire (1)
BackchannelJsonSerializerContext.ResourceSnapshot.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.ResourceSnapshot(){ Name = (string)args[0], DisplayName = (string)args[1], ResourceType = (string)args[2], Type = (string)args[3], State = (string)args[4], StateStyle = (string)args[5], HealthStatus = (string)args[6], ExitCode = (int?)args[7], CreatedAt = (global::System.DateTimeOffset?)args[8], StartedAt = (global::System.DateTimeOffset?)args[9], StoppedAt = (global::System.DateTimeOffset?)args[10], Urls = (global::Aspire.Cli.Backchannel.ResourceSnapshotUrl[])args[11], Relationships = (global::Aspire.Cli.Backchannel.ResourceSnapshotRelationship[])args[12], HealthReports = (global::Aspire.Cli.Backchannel.ResourceSnapshotHealthReport[])args[13], Volumes = (global::Aspire.Cli.Backchannel.ResourceSnapshotVolume[])args[14], EnvironmentVariables = (global::Aspire.Cli.Backchannel.ResourceSnapshotEnvironmentVariable[])args[15], Properties = (global::System.Collections.Generic.Dictionary<string, string>)args[16], McpServer = (global::Aspire.Cli.Backchannel.ResourceSnapshotMcpServer)args[17], Commands = (global::Aspire.Cli.Backchannel.ResourceSnapshotCommand[])args[18] },
Aspire.Cli.Tests (11)
Backchannel\ResourceSnapshotMapperTests.cs (4)
14var snapshot = new ResourceSnapshot 49var snapshot = new ResourceSnapshot 100new ResourceSnapshot 114new ResourceSnapshot
Commands\AgentMcpCommandTests.cs (2)
166new ResourceSnapshot 236new ResourceSnapshot
Mcp\ListResourcesToolTests.cs (5)
58new ResourceSnapshot 65new ResourceSnapshot 72new ResourceSnapshot 104new ResourceSnapshot 143new ResourceSnapshot
214 references to ResourceSnapshot
aspire (205)
Backchannel\AppHostAuxiliaryBackchannel.cs (11)
285public async Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default) 293var snapshots = await rpc.InvokeWithCancellationAsync<List<ResourceSnapshot>>( 308public async IAsyncEnumerable<ResourceSnapshot> WatchResourceSnapshotsAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) 314IAsyncEnumerable<ResourceSnapshot>? snapshots; 317snapshots = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<ResourceSnapshot>>( 333await foreach (var snapshot in snapshots.WithCancellation(cancellationToken).ConfigureAwait(false)) 524public async IAsyncEnumerable<ResourceSnapshot> WatchResourcesV2Async( 532await foreach (var snapshot in WatchResourceSnapshotsAsync(cancellationToken).ConfigureAwait(false)) 547IAsyncEnumerable<ResourceSnapshot>? snapshots; 550snapshots = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<ResourceSnapshot>>( 565await foreach (var snapshot in snapshots.WithCancellation(cancellationToken).ConfigureAwait(false))
Backchannel\BackchannelJsonSerializerContext.cs (5)
45[JsonSerializable(typeof(ResourceSnapshot))] 46[JsonSerializable(typeof(ResourceSnapshot[]))] 47[JsonSerializable(typeof(List<ResourceSnapshot>))] 48[JsonSerializable(typeof(IAsyncEnumerable<ResourceSnapshot>))] 49[JsonSerializable(typeof(MessageFormatterEnumerableTracker.EnumeratorResults<ResourceSnapshot>))]
Backchannel\IAppHostAuxiliaryBackchannel.cs (2)
61Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default); 68IAsyncEnumerable<ResourceSnapshot> WatchResourceSnapshotsAsync(CancellationToken cancellationToken = default);
Backchannel\ResourceSnapshotMapper.cs (12)
11/// Maps <see cref="ResourceSnapshot"/> to <see cref="ResourceJson"/> for serialization. 16/// Maps a list of <see cref="ResourceSnapshot"/> to a list of <see cref="ResourceJson"/>. 21public static List<ResourceJson> MapToResourceJsonList(IEnumerable<ResourceSnapshot> snapshots, string? dashboardBaseUrl = null, bool includeEnvironmentVariableValues = true) 28/// Maps a <see cref="ResourceSnapshot"/> to <see cref="ResourceJson"/>. 34public static ResourceJson MapToResourceJson(ResourceSnapshot snapshot, IReadOnlyList<ResourceSnapshot> allSnapshots, string? dashboardBaseUrl = null, bool includeEnvironmentVariableValues = true) 91foreach (var match in matches) 155public static string GetResourceName(ResourceSnapshot resource, IDictionary<string, ResourceSnapshot> allResources) 167public static string GetResourceName(ResourceSnapshot resource, IEnumerable<ResourceSnapshot> allResources) 170foreach (var item in allResources)
BackchannelJsonSerializerContext.EnumeratorResultsResourceSnapshot.g.cs (25)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>>? _EnumeratorResultsResourceSnapshot; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>> EnumeratorResultsResourceSnapshot 22get => _EnumeratorResultsResourceSnapshot ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>>)Options.GetTypeInfo(typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>> Create_EnumeratorResultsResourceSnapshot(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>> 32ObjectWithParameterizedConstructorCreator = static args => new global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>(){ Values = (global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>)args[0], Finished = (bool)args[1] }, 35ConstructorAttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>).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.ResourceSnapshot>>(options, objectInfo); 51var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>> 56DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>), 58Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>)obj).Values, 66AttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>).GetProperty("Values", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>), 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.ResourceSnapshot>>(options, info0); 76DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>), 78Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>)obj).Finished, 86AttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>).GetProperty("Finished", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 97private void EnumeratorResultsResourceSnapshotSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>? value) 108IReadOnlyListResourceSnapshotSerializeHandler(writer, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>)value).Values); 109writer.WriteBoolean(PropName_finished, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>)value).Finished); 119ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>),
BackchannelJsonSerializerContext.GetJsonTypeInfo.g.cs (6)
146if (type == typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot)) 150if (type == typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot[])) 326if (type == typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceSnapshot>)) 362if (type == typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>)) 402if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>)) 426if (type == typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>))
BackchannelJsonSerializerContext.GetResourcesResponse.g.cs (5)
32ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.GetResourcesResponse(){ Resources = (global::Aspire.Cli.Backchannel.ResourceSnapshot[])args[0] }, 51var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Backchannel.ResourceSnapshot[]> 66AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.GetResourcesResponse).GetProperty("Resources", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot[]), global::System.Array.Empty<global::System.Type>(), null), 69properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot[]>(options, info0); 100ParameterType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot[]),
BackchannelJsonSerializerContext.IAsyncEnumerableResourceSnapshot.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>>? _IAsyncEnumerableResourceSnapshot; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>> IAsyncEnumerableResourceSnapshot 22get => _IAsyncEnumerableResourceSnapshot ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>> Create_IAsyncEnumerableResourceSnapshot(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIAsyncEnumerableInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceSnapshot>, global::Aspire.Cli.Backchannel.ResourceSnapshot>(options, info);
BackchannelJsonSerializerContext.IReadOnlyListResourceSnapshot.g.cs (12)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>>? _IReadOnlyListResourceSnapshot; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>> IReadOnlyListResourceSnapshot 22get => _IReadOnlyListResourceSnapshot ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>> Create_IReadOnlyListResourceSnapshot(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>, global::Aspire.Cli.Backchannel.ResourceSnapshot>(options, info); 45private void IReadOnlyListResourceSnapshotSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceSnapshot>? value) 55foreach (global::Aspire.Cli.Backchannel.ResourceSnapshot element in value)
BackchannelJsonSerializerContext.ListResourceSnapshot.g.cs (12)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>>? _ListResourceSnapshot; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>> ListResourceSnapshot 22get => _ListResourceSnapshot ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>> Create_ListResourceSnapshot(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>> 31ObjectCreator = () => new global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>(), 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateListInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>, global::Aspire.Cli.Backchannel.ResourceSnapshot>(options, info); 45private void ListResourceSnapshotSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.List<global::Aspire.Cli.Backchannel.ResourceSnapshot>? value)
BackchannelJsonSerializerContext.ResourceSnapshot.g.cs (87)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot>? _ResourceSnapshot; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot> ResourceSnapshot 22get => _ResourceSnapshot ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot> Create_ResourceSnapshot(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.ResourceSnapshot>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.ResourceSnapshot> 35ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).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.ResourceSnapshot>(options, objectInfo); 56DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 58Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Name, 66AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 79DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 81Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).DisplayName, 89AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("DisplayName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 99DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 101Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).ResourceType, 109AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("ResourceType", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 119DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 121Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Type, 129AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Type", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 139DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 141Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).State, 149AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("State", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 159DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 161Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).StateStyle, 169AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("StateStyle", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 179DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 181Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).HealthStatus, 189AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("HealthStatus", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 199DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 201Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).ExitCode, 209AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("ExitCode", InstanceMemberBindingFlags, null, typeof(int?), global::System.Array.Empty<global::System.Type>(), null), 219DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 221Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).CreatedAt, 229AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null), 239DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 241Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).StartedAt, 249AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("StartedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null), 259DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 261Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).StoppedAt, 269AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("StoppedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null), 279DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 281Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Urls, 289AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Urls", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotUrl[]), global::System.Array.Empty<global::System.Type>(), null), 301DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 303Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Relationships, 311AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Relationships", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotRelationship[]), global::System.Array.Empty<global::System.Type>(), null), 323DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 325Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).HealthReports, 333AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("HealthReports", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotHealthReport[]), global::System.Array.Empty<global::System.Type>(), null), 345DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 347Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Volumes, 355AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Volumes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotVolume[]), global::System.Array.Empty<global::System.Type>(), null), 367DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 369Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).EnvironmentVariables, 377AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("EnvironmentVariables", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotEnvironmentVariable[]), global::System.Array.Empty<global::System.Type>(), null), 389DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 391Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Properties, 399AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null), 411DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 413Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).McpServer, 421AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("McpServer", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotMcpServer), global::System.Array.Empty<global::System.Type>(), null), 431DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot), 433Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceSnapshot)obj).Commands, 441AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot).GetProperty("Commands", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Backchannel.ResourceSnapshotCommand[]), global::System.Array.Empty<global::System.Type>(), null), 453private void ResourceSnapshotSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.ResourceSnapshot? value) 463writer.WriteString(PropName_Name, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Name); 464writer.WriteString(PropName_DisplayName, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).DisplayName); 465writer.WriteString(PropName_ResourceType, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).ResourceType); 466writer.WriteString(PropName_Type, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Type); 467writer.WriteString(PropName_State, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).State); 468writer.WriteString(PropName_StateStyle, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).StateStyle); 469writer.WriteString(PropName_HealthStatus, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).HealthStatus); 471global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).ExitCode, NullableInt32); 473global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).CreatedAt, NullableDateTimeOffset); 475global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).StartedAt, NullableDateTimeOffset); 477global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).StoppedAt, NullableDateTimeOffset); 479ResourceSnapshotUrlArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Urls); 481ResourceSnapshotRelationshipArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Relationships); 483ResourceSnapshotHealthReportArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).HealthReports); 485ResourceSnapshotVolumeArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Volumes); 487ResourceSnapshotEnvironmentVariableArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).EnvironmentVariables); 489DictionaryStringStringSerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Properties); 491ResourceSnapshotMcpServerSerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).McpServer); 493ResourceSnapshotCommandArraySerializeHandler(writer, ((global::Aspire.Cli.Backchannel.ResourceSnapshot)value).Commands);
BackchannelJsonSerializerContext.ResourceSnapshotArray.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot[]>? _ResourceSnapshotArray; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot[]> ResourceSnapshotArray 22get => _ResourceSnapshotArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot[]>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.ResourceSnapshot[])); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot[]> Create_ResourceSnapshotArray(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.ResourceSnapshot[]>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot[]> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::Aspire.Cli.Backchannel.ResourceSnapshot[]> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateArrayInfo<global::Aspire.Cli.Backchannel.ResourceSnapshot>(options, info); 45private void ResourceSnapshotArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.ResourceSnapshot[]? value)
Commands\LogsCommand.cs (1)
309foreach (var snapshot in snapshots.OrderBy(s => s.Name))
Commands\ResourcesCommand.cs (5)
196var allResources = new Dictionary<string, ResourceSnapshot>(StringComparer.OrdinalIgnoreCase); 199await foreach (var snapshot in connection.WatchResourceSnapshotsAsync(cancellationToken).ConfigureAwait(false)) 228private void DisplayResourcesTable(IReadOnlyList<ResourceSnapshot> snapshots) 283private void DisplayResourceUpdate(ResourceSnapshot snapshot, IDictionary<string, ResourceSnapshot> allResources)
Mcp\McpResourceToolRefreshService.cs (1)
94foreach (var resource in resourcesWithTools)
src\Aspire.Hosting\Backchannel\BackchannelDataTypes.cs (1)
164public required ResourceSnapshot[] Resources { get; init; }
Aspire.Cli.Tests (9)
Backchannel\ResourceSnapshotMapperTests.cs (5)
14var snapshot = new ResourceSnapshot 29var allSnapshots = new List<ResourceSnapshot> { snapshot }; 49var snapshot = new ResourceSnapshot 71var allSnapshots = new List<ResourceSnapshot> { snapshot }; 98var snapshots = new List<ResourceSnapshot>
TestServices\TestAppHostAuxiliaryBackchannel.cs (4)
27public List<ResourceSnapshot> ResourceSnapshots { get; set; } = []; 54public Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default) 59public async IAsyncEnumerable<ResourceSnapshot> WatchResourceSnapshotsAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) 61foreach (var snapshot in ResourceSnapshots)