2 instantiations of ResourcePropertyViewModel
Aspire.Dashboard (1)
ResourceService\Partials.cs (1)
143
var propertyViewModel = new
ResourcePropertyViewModel
(
Aspire.Dashboard.Tests (1)
Model\ResourceSourceViewModelTests.cs (1)
59
properties.TryAdd(propertyName, new
ResourcePropertyViewModel
(propertyName, propertyValue is null ? Value.ForNull() : Value.ForString(propertyValue), false, null, 0));
20 references to ResourcePropertyViewModel
Aspire.Dashboard (12)
Model\ResourceSourceViewModel.cs (1)
35
if (resource.Properties.TryGetValue(KnownProperties.Resource.Source, out
var
property) && property.Value is { HasStringValue: true, StringValue: var value })
Model\ResourceViewModel.cs (4)
39
public required ImmutableDictionary<string,
ResourcePropertyViewModel
> Properties { get; init; }
74
if (Properties.TryGetValue(propertyName, out
var
value))
266
private readonly
ResourcePropertyViewModel
_propertyViewModel;
280
public DisplayedResourcePropertyViewModel(
ResourcePropertyViewModel
propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider)
Model\ResourceViewModelExtensions.cs (4)
74
if (resource.Properties.TryGetValue(key, out
var
property) && property.Value.TryConvertToString(out var valueString))
86
if (resource.Properties.TryGetValue(key, out
var
property) && property is { Value: { ListValue: not null } value })
111
if (resource.Properties.TryGetValue(key, out
var
property) && property is { Value: { ListValue: not null } value })
136
if (resource.Properties.TryGetValue(key, out
var
property) && property.Value.TryConvertToInt(out i))
ResourceService\Partials.cs (3)
136
private ImmutableDictionary<string,
ResourcePropertyViewModel
> CreatePropertyViewModels(RepeatedField<ResourceProperty> properties, IKnownPropertyLookup knownPropertyLookup, ILogger logger)
138
var builder = ImmutableDictionary.CreateBuilder<string,
ResourcePropertyViewModel
>(StringComparers.ResourcePropertyName);
143
var
propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Components.Tests (3)
Pages\ResourcesTests.cs (1)
376
Properties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
17
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
39
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
Aspire.Dashboard.Tests (5)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
17
new KeyValuePair<string,
ResourcePropertyViewModel
>(
Model\ResourceSourceViewModelTests.cs (1)
18
var properties = new Dictionary<string,
ResourcePropertyViewModel
>();
Model\ResourceStateViewModelTests.cs (1)
72
var propertiesDictionary = new Dictionary<string,
ResourcePropertyViewModel
>();
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
17
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
39
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,