6 instantiations of ResourceJson
aspire (1)
Backchannel\ResourceSnapshotMapper.cs (1)
124
return new
ResourceJson
Aspire.Cli.Tests (5)
Commands\ResourcesCommandTests.cs (5)
162
new
ResourceJson
{ Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" },
163
new
ResourceJson
{ Name = "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" },
164
new
ResourceJson
{ Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Starting" }
204
new
ResourceJson
{ Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" },
205
new
ResourceJson
{ Name = "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" }
12 references to ResourceJson
aspire (9)
Backchannel\ResourceSnapshotMapper.cs (5)
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)
Commands\ResourcesCommand.cs (3)
25
public required
ResourceJson
[] Resources { get; init; }
29
[JsonSerializable(typeof(
ResourceJson
))]
210
var
resourceJson = ResourceSnapshotMapper.MapToResourceJson(snapshot, allResources.Values.ToList(), dashboardBaseUrl);
Mcp\Tools\ListResourcesTool.cs (1)
15
[JsonSerializable(typeof(
ResourceJson
[]))]
Aspire.Cli.Tests (3)
Backchannel\ResourceSnapshotMapperTests.cs (2)
32
var
result = ResourceSnapshotMapper.MapToResourceJson(snapshot, allSnapshots);
74
var
result = ResourceSnapshotMapper.MapToResourceJson(snapshot, allSnapshots, dashboardBaseUrl: "http://localhost:18080");
Commands\ResourcesCommandTests.cs (1)
180
var
deserialized = System.Text.Json.JsonSerializer.Deserialize(line, ResourcesCommandJsonContext.Ndjson.ResourceJson);