51 references to KnownProperties
Aspire.Dashboard (34)
Components\Pages\Resources.razor.cs (3)
610if (current.GetResourcePropertyValue(KnownProperties.Resource.ParentName) is { Length: > 0 } value) 732.Where(r => _resourceByName.Values.Any(nested => nested.GetResourcePropertyValue(KnownProperties.Resource.ParentName) == r.Name)) 770return _resourceByName.Values.Any(r => !string.IsNullOrEmpty(r.GetResourcePropertyValue(KnownProperties.Resource.ParentName)));
Model\KnownPropertyLookup.cs (20)
25new(KnownProperties.Resource.DisplayName, loc => loc[nameof(ResourcesDetailsDisplayNameProperty)]), 26new(KnownProperties.Resource.State, loc => loc[nameof(ResourcesDetailsStateProperty)]), 27new(KnownProperties.Resource.StartTime, loc => loc[nameof(ResourcesDetailsStartTimeProperty)]), 28new(KnownProperties.Resource.StopTime, loc => loc[nameof(ResourcesDetailsStopTimeProperty)]), 29new(KnownProperties.Resource.ExitCode, loc => loc[nameof(ResourcesDetailsExitCodeProperty)]), 30new(KnownProperties.Resource.HealthState, loc => loc[nameof(ResourcesDetailsHealthStateProperty)]), 31new(KnownProperties.Resource.ConnectionString, loc => loc[nameof(ResourcesDetailsConnectionStringProperty)]) 37new(KnownProperties.Project.Path, loc => loc[nameof(ResourcesDetailsProjectPathProperty)]), 38new(KnownProperties.Executable.Pid, loc => loc[nameof(ResourcesDetailsExecutableProcessIdProperty)]), 44new(KnownProperties.Executable.Path, loc => loc[nameof(ResourcesDetailsExecutablePathProperty)]), 45new(KnownProperties.Executable.WorkDir, loc => loc[nameof(ResourcesDetailsExecutableWorkingDirectoryProperty)]), 46new(KnownProperties.Executable.Args, loc => loc[nameof(ResourcesDetailsExecutableArgumentsProperty)]), 47new(KnownProperties.Executable.Pid, loc => loc[nameof(ResourcesDetailsExecutableProcessIdProperty)]), 53new(KnownProperties.Container.Image, loc => loc[nameof(ResourcesDetailsContainerImageProperty)]), 54new(KnownProperties.Container.Id, loc => loc[nameof(ResourcesDetailsContainerIdProperty)]), 55new(KnownProperties.Container.Command, loc => loc[nameof(ResourcesDetailsContainerCommandProperty)]), 56new(KnownProperties.Container.Args, loc => loc[nameof(ResourcesDetailsContainerArgumentsProperty)]), 57new(KnownProperties.Container.Ports, loc => loc[nameof(ResourcesDetailsContainerPortsProperty)]), 58new(KnownProperties.Container.Lifetime, loc => loc[nameof(ResourcesDetailsContainerLifetimeProperty)]), 63new(KnownProperties.Parameter.Value, loc => loc[nameof(ResourcesDetailsParameterValueProperty)])
Model\ResourceGridViewModel.cs (2)
60foreach (var childGridVM in initialGridVMs.Where(r => r.Resource.GetResourcePropertyValue(KnownProperties.Resource.ParentName) == resource.Name)) 75var parentName = gridViewModel.Resource.GetResourcePropertyValue(KnownProperties.Resource.ParentName);
Model\ResourceSourceViewModel.cs (1)
35if (resource.Properties.TryGetValue(KnownProperties.Resource.Source, out var property) && property.Value is { HasStringValue: true, StringValue: var value })
Model\ResourceViewModel.cs (1)
306if (propertyViewModel.Name == KnownProperties.Container.Id)
Model\ResourceViewModelExtensions.cs (7)
39return resource.TryGetCustomDataInt(KnownProperties.Resource.ExitCode, out exitCode); 44return resource.TryGetCustomDataString(KnownProperties.Container.Image, out containerImage); 49return resource.TryGetCustomDataString(KnownProperties.Project.Path, out projectPath); 54return resource.TryGetCustomDataString(KnownProperties.Executable.Path, out executablePath); 59return resource.TryGetCustomDataStringArray(KnownProperties.Executable.Args, out arguments); 64return resource.TryGetCustomDataStringArray(KnownProperties.Resource.AppArgs, out arguments); 69return resource.TryGetCustomDataBoolArray(KnownProperties.Resource.AppArgsSensitivity, out argParams);
Aspire.Dashboard.Tests (17)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (3)
19KnownProperties.Project.Path, 21KnownProperties.Project.Path, 27knownProperty: new(KnownProperties.Project.Path, loc => "Path"),
Model\ResourceSourceViewModelTests.cs (10)
19AddStringProperty(KnownProperties.Executable.Path, testData.ExecutablePath); 20AddStringProperty(KnownProperties.Project.Path, testData.ProjectPath); 21AddStringProperty(KnownProperties.Container.Image, testData.ContainerImage); 22AddStringProperty(KnownProperties.Resource.Source, testData.SourceProperty); 26properties.TryAdd(KnownProperties.Executable.Args, new ResourcePropertyViewModel(KnownProperties.Executable.Args, Value.ForList(testData.ExecutableArguments.Select(Value.ForString).ToArray()), false, null, 0)); 31properties.TryAdd(KnownProperties.Resource.AppArgs, new ResourcePropertyViewModel(KnownProperties.Resource.AppArgs, Value.ForList(testData.AppArgs.Select(Value.ForString).ToArray()), false, null, 0)); 36properties.TryAdd(KnownProperties.Resource.AppArgsSensitivity, new ResourcePropertyViewModel(KnownProperties.Resource.AppArgsSensitivity, Value.ForList(testData.AppArgsSensitivity.Select(b => Value.ForNumber(Convert.ToInt32(b))).ToArray()), false, null, 0));
Model\ResourceStateViewModelTests.cs (4)
75propertiesDictionary.TryAdd(KnownProperties.Resource.ExitCode, new ResourcePropertyViewModel(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), false, null, 0)); 88resource.Properties.TryAdd(KnownProperties.Resource.ExitCode, new ResourcePropertyViewModel(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), false, null, 0));