6 instantiations of ResourceJson
aspire (1)
Backchannel\ResourceSnapshotMapper.cs (1)
117return new ResourceJson
Aspire.Cli.Tests (5)
Commands\DescribeCommandTests.cs (5)
194new ResourceJson { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }, 195new ResourceJson { Name = "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" }, 196new ResourceJson { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Starting" } 236new ResourceJson { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }, 237new ResourceJson { Name = "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" }
18 references to ResourceJson
aspire (12)
Backchannel\ResourceSnapshotMapper.cs (5)
12/// Maps <see cref="ResourceSnapshot"/> to <see cref="ResourceJson"/> for serialization. 17/// Maps a list of <see cref="ResourceSnapshot"/> to a list of <see cref="ResourceJson"/>. 22public static List<ResourceJson> MapToResourceJsonList(IEnumerable<ResourceSnapshot> snapshots, string? dashboardBaseUrl = null, bool includeEnvironmentVariableValues = true) 29/// Maps a <see cref="ResourceSnapshot"/> to <see cref="ResourceJson"/>. 35public static ResourceJson MapToResourceJson(ResourceSnapshot snapshot, IReadOnlyList<ResourceSnapshot> allSnapshots, string? dashboardBaseUrl = null, bool includeEnvironmentVariableValues = true)
Commands\DescribeCommand.cs (3)
25public required ResourceJson[] Resources { get; init; } 29[JsonSerializable(typeof(ResourceJson))] 229var resourceJson = ResourceSnapshotMapper.MapToResourceJson(snapshot, currentSnapshots, dashboardBaseUrl);
Commands\PsCommand.cs (3)
32public List<ResourceJson>? Resources { get; set; } 36[JsonSerializable(typeof(ResourceJson))] 173List<ResourceJson>? resources = null;
Mcp\Tools\ListResourcesTool.cs (1)
15[JsonSerializable(typeof(ResourceJson[]))]
Aspire.Cli.Tests (6)
Backchannel\ResourceSnapshotMapperTests.cs (1)
39var result = ResourceSnapshotMapper.MapToResourceJson(snapshot, allSnapshots, dashboardBaseUrl: "http://localhost:18080");
Commands\DescribeCommandTests.cs (3)
212var deserialized = JsonSerializer.Deserialize(line, ResourcesCommandJsonContext.Ndjson.ResourceJson); 287var first = JsonSerializer.Deserialize(jsonLines[0], ResourcesCommandJsonContext.Ndjson.ResourceJson); 293var second = JsonSerializer.Deserialize(jsonLines[1], ResourcesCommandJsonContext.Ndjson.ResourceJson);
Commands\PsCommandTests.cs (2)
262var apiService = appHost.Resources.First(r => r.Name == "apiservice"); 269var redis = appHost.Resources.First(r => r.Name == "redis");