42 instantiations of ResourcePropertyViewModel
Aspire.Dashboard (3)
Components\Controls\ResourceDetails.razor.cs (2)
155displayedProperty = new ResourcePropertyViewModel( 381new ResourcePropertyViewModel(
ServiceClient\Partials.cs (1)
180var propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Components.Tests (15)
Controls\ResourceDetailsTests.cs (10)
434[KnownProperties.Resource.WaitingFor] = new( 469[KnownProperties.Resource.State] = new ResourcePropertyViewModel( 501["provider.diagnostic.message"] = new( 509["provider.diagnostic.secret"] = new( 517["provider.diagnostic.hidden"] = new( 562[KnownProperties.Container.Command] = new( 570[KnownProperties.Container.Image] = new( 578[KnownProperties.Container.Id] = new( 586["provider.diagnostic"] = new( 944return new(
Pages\ResourcesTests.cs (4)
142.Add(KnownProperties.Resource.ParentName, new ResourcePropertyViewModel( 1328.Add(KnownProperties.Parameter.Value, new ResourcePropertyViewModel( 1390.Add(KnownProperties.Parameter.Value, new ResourcePropertyViewModel( 1434.Add(KnownProperties.Parameter.Value, new ResourcePropertyViewModel(
Shared\TerminalSetupHelpers.cs (1)
46}.ToDictionary(pair => pair.Key, pair => new ResourcePropertyViewModel(
Aspire.Dashboard.Tests (24)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
22new ResourcePropertyViewModel(
Integration\Playwright\TerminalTests.cs (1)
602new(name, new Value { StringValue = value }, isValueSensitive: false, knownProperty: null,
Model\ResourceIconHelpersTests.cs (1)
120[KnownProperties.Project.Path] = new ResourcePropertyViewModel(KnownProperties.Project.Path, Value.ForString(projectPath), isValueSensitive: false, knownProperty: null, sortOrder: 0, displayName: null, isHighlighted: false)
Model\ResourceMenuBuilderTests.cs (1)
175[KnownProperties.Terminal.Enabled] = new ResourcePropertyViewModel(
Model\ResourceSourceViewModelTests.cs (4)
26properties.TryAdd(KnownProperties.Executable.Args, new ResourcePropertyViewModel(KnownProperties.Executable.Args, Value.ForList(testData.ExecutableArguments.Select(Value.ForString).ToArray()), false, null, 0, displayName: null, isHighlighted: false)); 31properties.TryAdd(KnownProperties.Resource.AppArgs, new ResourcePropertyViewModel(KnownProperties.Resource.AppArgs, Value.ForList(testData.AppArgs.Select(Value.ForString).ToArray()), false, null, 0, displayName: null, isHighlighted: false)); 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, displayName: null, isHighlighted: false)); 73properties.TryAdd(propertyName, new ResourcePropertyViewModel(propertyName, propertyValue is null ? Value.ForNull() : Value.ForString(propertyValue), false, null, 0, displayName: null, isHighlighted: false));
Model\ResourceStateViewModelTests.cs (6)
82propertiesDictionary.TryAdd(KnownProperties.Resource.ExitCode, new ResourcePropertyViewModel(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), false, null, 0, displayName: null, isHighlighted: false)); 95resource.Properties.TryAdd(KnownProperties.Resource.ExitCode, new ResourcePropertyViewModel(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), false, null, 0, displayName: null, isHighlighted: false)); 119[KnownProperties.Resource.WaitingFor] = new( 147[KnownProperties.Resource.WaitingFor] = new( 178[KnownProperties.Resource.WaitingFor] = new( 206[KnownProperties.Resource.WaitingFor] = new(
Model\ResourceViewModelExtensionsTerminalTests.cs (1)
86return new ResourcePropertyViewModel(
Model\TelemetryExportServiceTests.cs (5)
1398[KnownProperties.Resource.WaitingFor] = new( 1406[KnownProperties.Resource.ConnectionProperties] = new( 1531["container.ports"] = new( 1539["resource.exitCode"] = new( 1547["resource.enabled"] = new(
ResourceOutgoingPeerResolverTests.cs (3)
583[KnownProperties.Resource.ConnectionString] = new( 597properties[KnownProperties.Resource.ConnectionProperties] = new( 619[KnownProperties.Parameter.Value] = new(
Terminal\DefaultTerminalConnectionResolverTests.cs (1)
173return new ResourcePropertyViewModel(
69 references to ResourcePropertyViewModel
Aspire.Dashboard (20)
Components\Controls\ResourceDetails.razor.cs (2)
144foreach (var property in _resource.Properties.Values) 146var displayedProperty = property;
Components\Pages\Resources.razor.cs (1)
839if (resource.Properties.TryGetValue(KnownProperties.Parameter.Value, out var property))
Model\ResourceOutgoingPeerResolver.cs (2)
159var hasProperty1 = resource1.Properties.TryGetValue(propertyName, out var property1); 160var hasProperty2 = resource2.Properties.TryGetValue(propertyName, out var property2);
Model\ResourceViewModel.cs (8)
41public required ImmutableDictionary<string, ResourcePropertyViewModel> Properties { get; init; } 79if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out var connectionStringProperty) && 88if (Properties.TryGetValue(KnownProperties.Parameter.Value, out var parameterValueProperty) && 107if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out var connectionStringProperty) && 119if (!Properties.TryGetValue(KnownProperties.Resource.ConnectionProperties, out var connectionPropertiesProperty) || 172if (Properties.TryGetValue(propertyName, out var value)) 366private readonly ResourcePropertyViewModel _propertyViewModel; 384public DisplayedResourcePropertyViewModel(ResourcePropertyViewModel propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider)
Model\ResourceViewModelExtensions.cs (4)
204if (resource.Properties.TryGetValue(key, out var property) && property.Value.TryConvertToString(out var valueString)) 216if (resource.Properties.TryGetValue(key, out var property) && property is { Value: { ListValue: not null } value }) 241if (resource.Properties.TryGetValue(key, out var property) && property is { Value: { ListValue: not null } value }) 266if (resource.Properties.TryGetValue(key, out var property) && property.Value.TryConvertToInt(out i))
ServiceClient\Partials.cs (3)
170private ImmutableDictionary<string, ResourcePropertyViewModel> CreatePropertyViewModels(string resourceType, RepeatedField<ResourceProperty> properties, IKnownPropertyLookup knownPropertyLookup, ILogger logger) 172var builder = ImmutableDictionary.CreateBuilder<string, ResourcePropertyViewModel>(StringComparers.ResourcePropertyName); 180var propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Components.Tests (19)
Controls\ResourceDetailsTests.cs (11)
432properties: new Dictionary<string, ResourcePropertyViewModel> 467var properties = new Dictionary<string, ResourcePropertyViewModel> 499var properties = new Dictionary<string, ResourcePropertyViewModel> 560var properties = new Dictionary<string, ResourcePropertyViewModel> 742var properties = new Dictionary<string, ResourcePropertyViewModel> 788var properties = new Dictionary<string, ResourcePropertyViewModel> 834var properties = new Dictionary<string, ResourcePropertyViewModel> 864var properties = new Dictionary<string, ResourcePropertyViewModel> 891var properties = new Dictionary<string, ResourcePropertyViewModel> 916Dictionary<string, ResourcePropertyViewModel> properties, 942private static ResourcePropertyViewModel CreateParameterValueProperty(string value, bool isValueSensitive = false)
Pages\ResourcesTests.cs (6)
141var childProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty 1075ImmutableDictionary<string, ResourcePropertyViewModel>? properties = null, 1097Properties = properties ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty, 1327var parameterProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty 1389var parameterProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty 1433var parameterProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18Dictionary<string, ResourcePropertyViewModel>? properties = null, 45Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
Aspire.Dashboard.Tests (30)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
20new KeyValuePair<string, ResourcePropertyViewModel>(
Integration\Playwright\TerminalTests.cs (2)
588properties: new Dictionary<string, ResourcePropertyViewModel> 601private static ResourcePropertyViewModel StringProperty(string name, string value) =>
Model\ResourceIconHelpersTests.cs (1)
118var properties = new Dictionary<string, ResourcePropertyViewModel>
Model\ResourceMenuBuilderTests.cs (1)
173var resource = ModelTestHelpers.CreateResource(properties: new Dictionary<string, ResourcePropertyViewModel>
Model\ResourceSourceViewModelTests.cs (1)
18var properties = new Dictionary<string, ResourcePropertyViewModel>();
Model\ResourceStateViewModelTests.cs (5)
79var propertiesDictionary = new Dictionary<string, ResourcePropertyViewModel>(); 117properties: new Dictionary<string, ResourcePropertyViewModel> 145properties: new Dictionary<string, ResourcePropertyViewModel> 176properties: new Dictionary<string, ResourcePropertyViewModel> 204properties: new Dictionary<string, ResourcePropertyViewModel>
Model\ResourceViewModelExtensionsTerminalTests.cs (4)
17properties: new Dictionary<string, ResourcePropertyViewModel> 43var properties = new Dictionary<string, ResourcePropertyViewModel>(); 66properties: new Dictionary<string, ResourcePropertyViewModel> 84private static ResourcePropertyViewModel StringProperty(string name, string value)
Model\ResourceViewModelTests.cs (5)
187var property = vm.Properties[KnownProperties.Container.Image]; 229var property = vm.Properties[propertyName]; 264var property = vm.Properties[KnownProperties.Container.Image]; 314var image = vm.Properties[KnownProperties.Container.Image]; 320var id = vm.Properties[KnownProperties.Container.Id];
Model\TelemetryExportServiceTests.cs (2)
1396properties: new Dictionary<string, ResourcePropertyViewModel> 1529properties: new Dictionary<string, ResourcePropertyViewModel>
ResourceOutgoingPeerResolverTests.cs (2)
581var properties = new Dictionary<string, ResourcePropertyViewModel> 617var properties = new Dictionary<string, ResourcePropertyViewModel>
Terminal\DefaultTerminalConnectionResolverTests.cs (4)
101properties: new Dictionary<string, ResourcePropertyViewModel> 121properties: new Dictionary<string, ResourcePropertyViewModel> 164properties: new Dictionary<string, ResourcePropertyViewModel> 171private static ResourcePropertyViewModel StringProperty(string name, string value)
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18Dictionary<string, ResourcePropertyViewModel>? properties = null, 45Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,