78 references to KnownProperties
aspire (14)
Backchannel\ResourceSnapshotMapper.cs (1)
176snapshot.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)
417GetStringProperty(snapshot, KnownProperties.Resource.WaitingFor) is { } waitingForProperty && 501if (snapshot.Properties.TryGetValue(KnownProperties.Resource.Source, out var explicitSourceNode) && 511var projectPath = GetStringProperty(snapshot, KnownProperties.Project.Path); 517var executablePath = GetStringProperty(snapshot, KnownProperties.Executable.Path); 523return 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)
46[KnownProperties.Executable.Args] = null, 47[KnownProperties.Project.Path] = JsonValue.Create("/repo/maui/MauiApp.csproj"), 48[KnownProperties.Project.LaunchProfile] = JsonValue.Create("AndroidEmulator"), 49[KnownProperties.Project.LaunchCommand] = JsonValue.Create("watch"), 50[KnownProperties.Project.Configuration] = JsonValue.Create("Release"), 51[KnownProperties.Project.TargetFramework] = JsonValue.Create("net10.0"), 52[KnownProperties.Resource.LaunchConfigurationType] = JsonValue.Create("maui"), 53[KnownProperties.Resource.ParentName] = JsonValue.Create("mauiapp"), 59Assert.Null(result.Properties![KnownProperties.Executable.Args]); 60Assert.Equal("maui", result.Properties![KnownProperties.Resource.LaunchConfigurationType]!.GetValue<string>()); 61Assert.Equal("watch", result.Properties[KnownProperties.Project.LaunchCommand]!.GetValue<string>()); 62Assert.Equal("Release", result.Properties[KnownProperties.Project.Configuration]!.GetValue<string>()); 63Assert.Equal("net10.0", result.Properties[KnownProperties.Project.TargetFramework]!.GetValue<string>());
Commands\DescribeCommandTests.cs (18)
294[KnownProperties.Executable.Args] = null, 295[KnownProperties.Executable.Path] = JsonValue.Create("dotnet"), 296[KnownProperties.Project.Configuration] = JsonValue.Create("Release"), 297[KnownProperties.Project.LaunchCommand] = JsonValue.Create("watch"), 298[KnownProperties.Project.LaunchProfile] = JsonValue.Create("https"), 299[KnownProperties.Project.Path] = JsonValue.Create("/repo/api/Api.csproj"), 300[KnownProperties.Project.TargetFramework] = JsonValue.Create("net10.0"), 301[KnownProperties.Resource.LaunchConfigurationType] = JsonValue.Create("project"), 302[KnownProperties.Resource.ParentName] = JsonValue.Create("group"), 314[KnownProperties.Executable.Args] = null, 315[KnownProperties.Executable.Path] = JsonValue.Create("dotnet"), 316[KnownProperties.Executable.Pid] = JsonValue.Create(1234), 317[KnownProperties.Project.LaunchProfile] = JsonValue.Create("AndroidEmulator"), 318[KnownProperties.Project.Path] = JsonValue.Create("/repo/maui/MauiApp.csproj"), 319[KnownProperties.Resource.LaunchConfigurationType] = JsonValue.Create("maui"), 320[KnownProperties.Resource.ParentName] = JsonValue.Create("mauiapp"), 848[KnownProperties.Resource.ConnectionProperties] = new JsonObject 869.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)
399[KnownProperties.Resource.ExcludeFromMcp] = JsonValue.Create(true) 731[KnownProperties.Project.Path] = JsonValue.Create(@"C:\repo\Api\Api.csproj") 741[KnownProperties.Executable.Path] = JsonValue.Create(@"C:\repo\bin\worker.exe") 769[KnownProperties.Resource.Source] = JsonValue.Create(string.Empty), 770[KnownProperties.Project.Path] = JsonValue.Create("/repo/Project/Project.csproj") 780[KnownProperties.Resource.Source] = JsonValue.Create(string.Empty), 781[KnownProperties.Executable.Path] = JsonValue.Create("/repo/bin/worker") 791[KnownProperties.Resource.Source] = JsonValue.Create(string.Empty), 792[KnownProperties.Container.Image] = JsonValue.Create("redis:8") 820[KnownProperties.Container.Image] = JsonValue.Create(sourceValue) 893[KnownProperties.Project.Path] = JsonValue.Create("/repo/Api/Api.csproj"), 971[KnownProperties.Container.Image] = JsonValue.Create("redis:8"), 972[KnownProperties.Executable.Path] = JsonValue.Create("/repo/bin/container-secret") 982[KnownProperties.Executable.Path] = JsonValue.Create("/repo/bin/worker") 992[KnownProperties.Resource.Source] = JsonValue.Create("generic-source-secret") 1002[KnownProperties.Project.Path] = JsonValue.Create("/repo/CaseMismatched/CaseMismatched.csproj"), 1003[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)