40 instantiations of ResourcePropertyViewModel
Aspire.Dashboard (3)
Components\Controls\ResourceDetails.razor.cs (2)
162
displayedProperty = new
ResourcePropertyViewModel
(
387
new
ResourcePropertyViewModel
(
ServiceClient\Partials.cs (1)
168
var 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
(
944
return
new
(
Pages\ConsoleLogsTerminalTests.cs (1)
698
return new
ResourcePropertyViewModel
(
Pages\ResourcesTests.cs (4)
80
.Add(KnownProperties.Resource.ParentName, new
ResourcePropertyViewModel
(
964
.Add(KnownProperties.Parameter.Value, new
ResourcePropertyViewModel
(
1026
.Add(KnownProperties.Parameter.Value, new
ResourcePropertyViewModel
(
1070
.Add(KnownProperties.Parameter.Value, new
ResourcePropertyViewModel
(
Aspire.Dashboard.Tests (22)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
20
new
ResourcePropertyViewModel
(
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\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, displayName: null, isHighlighted: false));
31
properties.TryAdd(KnownProperties.Resource.AppArgs, new
ResourcePropertyViewModel
(KnownProperties.Resource.AppArgs, Value.ForList(testData.AppArgs.Select(Value.ForString).ToArray()), false, null, 0, displayName: null, isHighlighted: false));
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, displayName: null, isHighlighted: false));
73
properties.TryAdd(propertyName, new
ResourcePropertyViewModel
(propertyName, propertyValue is null ? Value.ForNull() : Value.ForString(propertyValue), false, null, 0, displayName: null, isHighlighted: false));
Model\ResourceStateViewModelTests.cs (6)
82
propertiesDictionary.TryAdd(KnownProperties.Resource.ExitCode, new
ResourcePropertyViewModel
(KnownProperties.Resource.ExitCode, Value.ForNumber((double)exitCode), false, null, 0, displayName: null, isHighlighted: false));
95
resource.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)
98
return 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
(
597
properties[KnownProperties.Resource.ConnectionProperties] =
new
(
619
[KnownProperties.Parameter.Value] =
new
(
Terminal\DefaultTerminalConnectionResolverTests.cs (1)
130
return new
ResourcePropertyViewModel
(
70 references to ResourcePropertyViewModel
Aspire.Dashboard (20)
Components\Controls\ResourceDetails.razor.cs (2)
151
foreach (
var
property in _resource.Properties.Values)
153
var
displayedProperty = property;
Components\Pages\Resources.razor.cs (1)
775
if (resource.Properties.TryGetValue(KnownProperties.Parameter.Value, out
var
property))
Model\ResourceOutgoingPeerResolver.cs (2)
159
var hasProperty1 = resource1.Properties.TryGetValue(propertyName, out
var
property1);
160
var hasProperty2 = resource2.Properties.TryGetValue(propertyName, out
var
property2);
Model\ResourceViewModel.cs (8)
41
public required ImmutableDictionary<string,
ResourcePropertyViewModel
> Properties { get; init; }
79
if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out
var
connectionStringProperty) &&
88
if (Properties.TryGetValue(KnownProperties.Parameter.Value, out
var
parameterValueProperty) &&
107
if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out
var
connectionStringProperty) &&
119
if (!Properties.TryGetValue(KnownProperties.Resource.ConnectionProperties, out
var
connectionPropertiesProperty) ||
172
if (Properties.TryGetValue(propertyName, out
var
value))
366
private readonly
ResourcePropertyViewModel
_propertyViewModel;
384
public DisplayedResourcePropertyViewModel(
ResourcePropertyViewModel
propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider)
Model\ResourceViewModelExtensions.cs (4)
234
if (resource.Properties.TryGetValue(key, out
var
property) && property.Value.TryConvertToString(out var valueString))
246
if (resource.Properties.TryGetValue(key, out
var
property) && property is { Value: { ListValue: not null } value })
271
if (resource.Properties.TryGetValue(key, out
var
property) && property is { Value: { ListValue: not null } value })
296
if (resource.Properties.TryGetValue(key, out
var
property) && property.Value.TryConvertToInt(out i))
ServiceClient\Partials.cs (3)
158
private ImmutableDictionary<string,
ResourcePropertyViewModel
> CreatePropertyViewModels(string resourceType, RepeatedField<ResourceProperty> properties, IKnownPropertyLookup knownPropertyLookup, ILogger logger)
160
var builder = ImmutableDictionary.CreateBuilder<string,
ResourcePropertyViewModel
>(StringComparers.ResourcePropertyName);
168
var
propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Components.Tests (21)
Controls\ResourceDetailsTests.cs (11)
432
properties: new Dictionary<string,
ResourcePropertyViewModel
>
467
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
499
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
560
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
742
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
788
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
834
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
864
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
891
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
916
Dictionary<string,
ResourcePropertyViewModel
> properties,
942
private static
ResourcePropertyViewModel
CreateParameterValueProperty(string value, bool isValueSensitive = false)
Pages\ConsoleLogsTerminalTests.cs (2)
683
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
696
private static
ResourcePropertyViewModel
StringProperty(string name, string value)
Pages\ResourcesTests.cs (6)
79
var childProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
711
ImmutableDictionary<string,
ResourcePropertyViewModel
>? properties = null,
733
Properties = properties ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
963
var parameterProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
1025
var parameterProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
1069
var parameterProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
45
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
Aspire.Dashboard.Tests (29)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
18
new KeyValuePair<string,
ResourcePropertyViewModel
>(
Model\ResourceIconHelpersTests.cs (1)
118
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
Model\ResourceSourceViewModelTests.cs (1)
18
var properties = new Dictionary<string,
ResourcePropertyViewModel
>();
Model\ResourceStateViewModelTests.cs (5)
79
var propertiesDictionary = new Dictionary<string,
ResourcePropertyViewModel
>();
117
properties: new Dictionary<string,
ResourcePropertyViewModel
>
145
properties: new Dictionary<string,
ResourcePropertyViewModel
>
176
properties: new Dictionary<string,
ResourcePropertyViewModel
>
204
properties: new Dictionary<string,
ResourcePropertyViewModel
>
Model\ResourceViewModelExtensionsTerminalTests.cs (6)
17
properties: new Dictionary<string,
ResourcePropertyViewModel
>
37
properties: new Dictionary<string,
ResourcePropertyViewModel
>
52
properties: new Dictionary<string,
ResourcePropertyViewModel
>
64
properties: new Dictionary<string,
ResourcePropertyViewModel
>
78
properties: new Dictionary<string,
ResourcePropertyViewModel
>
96
private static
ResourcePropertyViewModel
StringProperty(string name, string value)
Model\ResourceViewModelTests.cs (5)
187
var
property = vm.Properties[KnownProperties.Container.Image];
229
var
property = vm.Properties[propertyName];
264
var
property = vm.Properties[KnownProperties.Container.Image];
314
var
image = vm.Properties[KnownProperties.Container.Image];
320
var
id = vm.Properties[KnownProperties.Container.Id];
Model\TelemetryExportServiceTests.cs (2)
1396
properties: new Dictionary<string,
ResourcePropertyViewModel
>
1529
properties: new Dictionary<string,
ResourcePropertyViewModel
>
ResourceOutgoingPeerResolverTests.cs (2)
581
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
617
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
Terminal\DefaultTerminalConnectionResolverTests.cs (4)
62
properties: new Dictionary<string,
ResourcePropertyViewModel
>
82
properties: new Dictionary<string,
ResourcePropertyViewModel
>
119
properties: new Dictionary<string,
ResourcePropertyViewModel
>
128
private static
ResourcePropertyViewModel
StringProperty(string name, string value)
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
45
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,