8 instantiations of ResourcePropertyViewModel
Aspire.Dashboard (1)
ServiceClient\Partials.cs (1)
143
var propertyViewModel = new
ResourcePropertyViewModel
(
Aspire.Dashboard.Tests (7)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
20
new
ResourcePropertyViewModel
(
Model\ResourceSourceViewModelTests.cs (4)
26
properties.TryAdd(KnownProperties.Executable.Args, new
ResourcePropertyViewModel
(KnownProperties.Executable.Args, Value.ForList(testData.ExecutableArguments.Select(Value.ForString).ToArray()), false, null, 0));
31
properties.TryAdd(KnownProperties.Resource.AppArgs, new
ResourcePropertyViewModel
(KnownProperties.Resource.AppArgs, Value.ForList(testData.AppArgs.Select(Value.ForString).ToArray()), false, null, 0));
36
properties.TryAdd(KnownProperties.Resource.AppArgsSensitivity, new
ResourcePropertyViewModel
(KnownProperties.Resource.AppArgsSensitivity, Value.ForList(testData.AppArgsSensitivity.Select(b => Value.ForNumber(Convert.ToInt32(b))).ToArray()), false, null, 0));
59
properties.TryAdd(propertyName, new
ResourcePropertyViewModel
(propertyName, propertyValue is null ? Value.ForNull() : Value.ForString(propertyValue), false, null, 0));
Model\ResourceStateViewModelTests.cs (2)
75
propertiesDictionary.TryAdd(KnownProperties.Resource.ExitCode, new
ResourcePropertyViewModel
(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), false, null, 0));
88
resource.Properties.TryAdd(KnownProperties.Resource.ExitCode, new
ResourcePropertyViewModel
(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), 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))
270
private readonly
ResourcePropertyViewModel
_propertyViewModel;
287
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))
ServiceClient\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)
18
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,