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