10 instantiations of ResourcePropertyViewModel
Aspire.Dashboard (1)
ServiceClient\Partials.cs (1)
155var propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Tests (9)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
20new 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)); 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)); 59properties.TryAdd(propertyName, new ResourcePropertyViewModel(propertyName, propertyValue is null ? Value.ForNull() : Value.ForString(propertyValue), false, null, 0));
Model\ResourceStateViewModelTests.cs (2)
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));
ResourceOutgoingPeerResolverTests.cs (2)
328[KnownProperties.Resource.ConnectionString] = new( 346[KnownProperties.Parameter.Value] = new(
26 references to ResourcePropertyViewModel
Aspire.Dashboard (16)
Model\ResourceOutgoingPeerResolver.cs (2)
123var hasProperty1 = resource1.Properties.TryGetValue(propertyName, out var property1); 124var hasProperty2 = resource2.Properties.TryGetValue(propertyName, out var property2);
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 (6)
40public required ImmutableDictionary<string, ResourcePropertyViewModel> Properties { get; init; } 67if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out var connectionStringProperty) && 76if (Properties.TryGetValue(KnownProperties.Parameter.Value, out var parameterValueProperty) && 115if (Properties.TryGetValue(propertyName, out var value)) 311private readonly ResourcePropertyViewModel _propertyViewModel; 328public DisplayedResourcePropertyViewModel(ResourcePropertyViewModel propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider)
Model\ResourceViewModelExtensions.cs (4)
74if (resource.Properties.TryGetValue(key, out var property) && property.Value.TryConvertToString(out var valueString)) 86if (resource.Properties.TryGetValue(key, out var property) && property is { Value: { ListValue: not null } value }) 111if (resource.Properties.TryGetValue(key, out var property) && property is { Value: { ListValue: not null } value }) 136if (resource.Properties.TryGetValue(key, out var property) && property.Value.TryConvertToInt(out i))
ServiceClient\Partials.cs (3)
148private ImmutableDictionary<string, ResourcePropertyViewModel> CreatePropertyViewModels(RepeatedField<ResourceProperty> properties, IKnownPropertyLookup knownPropertyLookup, ILogger logger) 150var builder = ImmutableDictionary.CreateBuilder<string, ResourcePropertyViewModel>(StringComparers.ResourcePropertyName); 155var propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Components.Tests (3)
Pages\ResourcesTests.cs (1)
376Properties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18Dictionary<string, ResourcePropertyViewModel>? properties = null, 42Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
Aspire.Dashboard.Tests (7)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
18new KeyValuePair<string, ResourcePropertyViewModel>(
Model\ResourceSourceViewModelTests.cs (1)
18var properties = new Dictionary<string, ResourcePropertyViewModel>();
Model\ResourceStateViewModelTests.cs (1)
72var propertiesDictionary = new Dictionary<string, ResourcePropertyViewModel>();
ResourceOutgoingPeerResolverTests.cs (2)
326var properties = new Dictionary<string, ResourcePropertyViewModel> 344var properties = new Dictionary<string, ResourcePropertyViewModel>
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18Dictionary<string, ResourcePropertyViewModel>? properties = null, 42Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,