78 references to KnownProperties
aspire (14)
Backchannel\ResourceSnapshotMapper.cs (1)
177snapshot.Properties.TryGetValue(KnownProperties.Resource.WaitingFor, out var waitingForProperty) &&
Commands\TerminalResourceResolver.cs (1)
91if (snapshot.Properties.TryGetValue(KnownProperties.Terminal.ReplicaIndex, out var property))
Mcp\Tools\ListResourcesTool.cs (5)
419GetStringProperty(snapshot, KnownProperties.Resource.WaitingFor) is { } waitingForProperty && 503if (snapshot.Properties.TryGetValue(KnownProperties.Resource.Source, out var explicitSourceNode) && 513var projectPath = GetStringProperty(snapshot, KnownProperties.Project.Path); 519var executablePath = GetStringProperty(snapshot, KnownProperties.Executable.Path); 525return GetBoundedText(GetStringProperty(snapshot, KnownProperties.Container.Image));
Mcp\Tools\McpToolHelpers.cs (1)
372if (snapshot.Properties.TryGetValue(KnownProperties.Resource.ExcludeFromMcp, out var value) && value is not null)
src\Shared\Model\ResourceSourceViewModel.cs (6)
13if (properties.TryGetValue(KnownProperties.Resource.Source, out var explicitSource) && 21properties.TryGetValue(KnownProperties.Project.Path, out var projectPath) && 28properties.TryGetValue(KnownProperties.Tool.Package, out var toolPackage) && 34if (properties.TryGetValue(KnownProperties.Executable.Path, out var executablePath) && 40if (properties.TryGetValue(KnownProperties.Container.Image, out var containerImage) && 46if (properties.TryGetValue(KnownProperties.Resource.Source, out var source) &&
Aspire.Cli.Tests (64)
Backchannel\ResourceSnapshotMapperTests.cs (13)
62[KnownProperties.Executable.Args] = null, 63[KnownProperties.Project.Path] = JsonValue.Create("/repo/maui/MauiApp.csproj"), 64[KnownProperties.Project.LaunchProfile] = JsonValue.Create("AndroidEmulator"), 65[KnownProperties.Project.LaunchCommand] = JsonValue.Create("watch"), 66[KnownProperties.Project.Configuration] = JsonValue.Create("Release"), 67[KnownProperties.Project.TargetFramework] = JsonValue.Create("net10.0"), 68[KnownProperties.Resource.LaunchConfigurationType] = JsonValue.Create("maui"), 69[KnownProperties.Resource.ParentName] = JsonValue.Create("mauiapp"), 75Assert.Null(result.Properties![KnownProperties.Executable.Args]); 76Assert.Equal("maui", result.Properties![KnownProperties.Resource.LaunchConfigurationType]!.GetValue<string>()); 77Assert.Equal("watch", result.Properties[KnownProperties.Project.LaunchCommand]!.GetValue<string>()); 78Assert.Equal("Release", result.Properties[KnownProperties.Project.Configuration]!.GetValue<string>()); 79Assert.Equal("net10.0", result.Properties[KnownProperties.Project.TargetFramework]!.GetValue<string>());
Commands\DescribeCommandTests.cs (18)
407[KnownProperties.Executable.Args] = null, 408[KnownProperties.Executable.Path] = JsonValue.Create("dotnet"), 409[KnownProperties.Project.Configuration] = JsonValue.Create("Release"), 410[KnownProperties.Project.LaunchCommand] = JsonValue.Create("watch"), 411[KnownProperties.Project.LaunchProfile] = JsonValue.Create("https"), 412[KnownProperties.Project.Path] = JsonValue.Create("/repo/api/Api.csproj"), 413[KnownProperties.Project.TargetFramework] = JsonValue.Create("net10.0"), 414[KnownProperties.Resource.LaunchConfigurationType] = JsonValue.Create("project"), 415[KnownProperties.Resource.ParentName] = JsonValue.Create("group"), 427[KnownProperties.Executable.Args] = null, 428[KnownProperties.Executable.Path] = JsonValue.Create("dotnet"), 429[KnownProperties.Executable.Pid] = JsonValue.Create(1234), 430[KnownProperties.Project.LaunchProfile] = JsonValue.Create("AndroidEmulator"), 431[KnownProperties.Project.Path] = JsonValue.Create("/repo/maui/MauiApp.csproj"), 432[KnownProperties.Resource.LaunchConfigurationType] = JsonValue.Create("maui"), 433[KnownProperties.Resource.ParentName] = JsonValue.Create("mauiapp"), 961[KnownProperties.Resource.ConnectionProperties] = new JsonObject 982.GetProperty(KnownProperties.Resource.ConnectionProperties);
Commands\TerminalResourceResolverTests.cs (2)
252Properties = new() { [KnownProperties.Terminal.ReplicaIndex] = JsonNode.Parse(json) } 351return replicaIndex is null ? [] : new() { [KnownProperties.Terminal.ReplicaIndex] = JsonValue.Create(replicaIndex) };
Commands\TerminalTapePlayCommandTests.cs (2)
211Properties = new() { [KnownProperties.Terminal.ReplicaIndex] = JsonValue.Create("0") } 217Properties = new() { [KnownProperties.Terminal.ReplicaIndex] = JsonValue.Create("1") }
Mcp\ExcludeFromMcpTests.cs (9)
46[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 61[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(false) 76[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create("true") 91[KnownProperties.Resource.ExcludeFromMcp] = null 131[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 173[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 219[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 291[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 485[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true)
Mcp\ListResourcesToolTests.cs (17)
401[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 733[KnownProperties.Project.Path] = JsonValue.Create(@"C:\repo\Api\Api.csproj") 743[KnownProperties.Executable.Path] = JsonValue.Create(@"C:\repo\bin\worker.exe") 771[KnownProperties.Resource.Source] = JsonValue.Create(string.Empty), 772[KnownProperties.Project.Path] = JsonValue.Create("/repo/Project/Project.csproj") 782[KnownProperties.Resource.Source] = JsonValue.Create(string.Empty), 783[KnownProperties.Executable.Path] = JsonValue.Create("/repo/bin/worker") 793[KnownProperties.Resource.Source] = JsonValue.Create(string.Empty), 794[KnownProperties.Container.Image] = JsonValue.Create("redis:8") 822[KnownProperties.Container.Image] = JsonValue.Create(sourceValue) 895[KnownProperties.Project.Path] = JsonValue.Create("/repo/Api/Api.csproj"), 973[KnownProperties.Container.Image] = JsonValue.Create("redis:8"), 974[KnownProperties.Executable.Path] = JsonValue.Create("/repo/bin/container-secret") 984[KnownProperties.Executable.Path] = JsonValue.Create("/repo/bin/worker") 994[KnownProperties.Resource.Source] = JsonValue.Create("generic-source-secret") 1004[KnownProperties.Project.Path] = JsonValue.Create("/repo/CaseMismatched/CaseMismatched.csproj"), 1005[KnownProperties.Resource.Source] = JsonValue.Create("case-mismatch-secret")
Mcp\WaitForResourcesToolTests.cs (3)
108[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 266[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 377[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true)