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