80 instantiations of ResourcePropertyViewModel
Aspire.Dashboard (4)
Components\Controls\ResourceDetails.razor.cs (2)
158
displayedProperty = new
ResourcePropertyViewModel
(
384
new
ResourcePropertyViewModel
(
Components\Pages\ResourceOverview.Details.cs (1)
99
displayedProperty = new
ResourcePropertyViewModel
(
ServiceClient\Partials.cs (1)
181
var propertyViewModel = new
ResourcePropertyViewModel
(
Aspire.Dashboard.Components.Tests (41)
Controls\ResourceDetailsTests.cs (12)
466
[KnownProperties.Resource.WaitingFor] =
new
(
501
[KnownProperties.Resource.State] = new
ResourcePropertyViewModel
(
533
["provider.diagnostic.message"] =
new
(
541
["provider.diagnostic.secret"] =
new
(
549
["provider.diagnostic.hidden"] =
new
(
594
[KnownProperties.Container.Command] =
new
(
602
[KnownProperties.Container.Image] =
new
(
610
[KnownProperties.Container.Id] =
new
(
618
["provider.diagnostic"] =
new
(
650
static ResourcePropertyViewModel Trait(string name, params string[] values) =>
new
(
663
new
ResourcePropertyViewModel
("provider.diagnostic", Value.ForString("hidden"), false, null, int.MaxValue, null, false)
1010
return
new
(
Controls\ResourceNameDisplayTests.cs (1)
33
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, Value.ForString(lifetime), false, null, 0, null, false)
Controls\TerminalDisconnectedBannerTests.cs (2)
40
[KnownProperties.Resource.ExitCode] =
new
(KnownProperties.Resource.ExitCode, Value.ForString(exitCode),
121
[KnownProperties.Resource.ExitCode] =
new
(KnownProperties.Resource.ExitCode, Value.ForString("42"),
Dialogs\ManageDataDialogTests.cs (1)
44
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, Value.ForString("Persistent"), false, null, 0, null, false)
Layout\ResourcesLayoutTests.cs (14)
427
[property] =
new
(property, Value.ForString(original), false, null, 0, null, false)
921
[name] =
new
(name, Value.ForList(Value.ForString("Backend"), Value.ForString("API")), false, null, 0, null, false)
951
[name] =
new
(name, Value.ForList([.. tags.Select(Value.ForString)]), false, null, 0, null, false)
1125
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, Value.ForString("Persistent"), false, null, 0, null, false)
1264
[KnownProperties.Resource.ParentName] =
new
(KnownProperties.Resource.ParentName, Value.ForString("root"), false, null, 0, null, false)
1268
[KnownProperties.Resource.ParentName] =
new
(KnownProperties.Resource.ParentName, Value.ForString("root"), false, null, 0, null, false)
1301
[KnownProperties.Resource.ParentName] =
new
(KnownProperties.Resource.ParentName, Value.ForString("root"), false, null, 0, null, false)
1322
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, Value.ForString("Persistent"), false, null, 0, null, false)
1926
[KnownProperties.Resource.ParentName] =
new
(KnownProperties.Resource.ParentName, Value.ForString("postgres"), false, null, 0, null, false),
1927
[tagKey] =
new
(tagKey, Value.ForList([Value.ForString("Data"), Value.ForString("Backend")]), false, null, 0, null, false)
1969
[KnownProperties.Resource.ParentName] =
new
(KnownProperties.Resource.ParentName, Value.ForString(parent), false, null, 0, null, false)
2021
[KnownProperties.Terminal.Enabled] =
new
(KnownProperties.Terminal.Enabled, Value.ForString("true"), false, null, 0, null, false)
2704
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, Value.ForString(lifetime), false, null, 0, null, false)
2799
[tagProperty] =
new
(tagProperty, Value.ForList(Value.ForString("Backend")), false, null, 0, null, false)
Pages\ResourceOverviewEmptyPanelsTests.cs (2)
170
["enabled"] =
new
("enabled", Value.ForBool(false), false, null, 0, null, true)
202
["custom"] =
new
("custom", Value.ForString("custom-value"), false, null, 0, null, false)
Pages\ResourceOverviewPersistenceTests.cs (1)
84
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, Value.ForString(lifetime), false, null, 0, null, false)
Pages\ResourceOverviewTypeDisplayNameTests.cs (1)
81
[KnownProperties.Resource.Type] =
new
(KnownProperties.Resource.Type, Value.ForString(resourceType), false, null, 0, null, false)
Pages\ResourcesTests.cs (6)
92
[KnownProperties.Container.Lifetime] =
new
(KnownProperties.Container.Lifetime, ProtobufValue.ForString(lifetime), false, null, 0, null, false)
199
.Add(KnownProperties.Resource.ParentName, new
ResourcePropertyViewModel
(
525
[tagProperty] =
new
(tagProperty, ProtobufValue.ForList(ProtobufValue.ForString("Backend"), ProtobufValue.ForString("API")), false, null, 0, null, false)
1312
.Add(KnownProperties.Parameter.Value, new
ResourcePropertyViewModel
(
1374
.Add(KnownProperties.Parameter.Value, new
ResourcePropertyViewModel
(
1418
.Add(KnownProperties.Parameter.Value, new
ResourcePropertyViewModel
(
Shared\TerminalSetupHelpers.cs (1)
52
var resourceProperties = properties.ToDictionary(pair => pair.Key, pair => new
ResourcePropertyViewModel
(
Aspire.Dashboard.Playwright.Tests (10)
Integration\Playwright\ResourcePanelNavigationTests.cs (1)
507
[KnownProperties.Terminal.Enabled] =
new
(
Integration\Playwright\ResourcePaneResponsiveTests.cs (5)
2760
new
(KnownProperties.Resource.ParentName, Value.ForString(index % 2 == 0 ? "api" : "cache"), false, null, 0, null, false)
2795
new
(tagKey, Value.ForList([.. tags.Select(Value.ForString)]), false, null, 0, null, false));
2802
properties = properties.Add(key,
new
(key, Value.ForString(value), false, null, 0, null, false));
2807
new
(KnownProperties.Container.Lifetime, Value.ForString("Persistent"), false, null, 0, null, false));
2812
new
(KnownProperties.Resource.ParentName, Value.ForString(name == "frontend" ? "queue" : "cache"), false, null, 0, null, false));
Integration\Playwright\TemplateResourceAssertionsTests.cs (1)
87
[KnownProperties.Container.Image] =
new
(KnownProperties.Container.Image,
Integration\Playwright\TerminalDockTests.cs (1)
490
[KnownProperties.Terminal.Enabled] =
new
(
Integration\Playwright\TerminalTests.cs (1)
684
new
(name, new Value { StringValue = value }, isValueSensitive: false, knownProperty: null,
tests\Aspire.Dashboard.Tests\Shared\MockDashboardClient.cs (1)
23
new
ResourcePropertyViewModel
(
Aspire.Dashboard.Tests (25)
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)
254
[KnownProperties.Terminal.Enabled] = new
ResourcePropertyViewModel
(
Model\ResourceOrderStoreTests.cs (1)
263
[KnownProperties.Resource.DisplayOrder] =
new
(KnownProperties.Resource.DisplayOrder, Value.ForString(order.ToString(CultureInfo.InvariantCulture)), false, null, 0, null, 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\ResourceTagStoreTests.cs (1)
36
[name] =
new
(name, Value.ForList(Value.ForString("Backend"), Value.ForString("API")), false, null, 0, null, false)
Model\ResourceViewModelExtensionsTerminalTests.cs (1)
86
return new
ResourcePropertyViewModel
(
Model\TelemetryExportServiceTests.cs (5)
1398
[KnownProperties.Resource.WaitingFor] =
new
(
1406
[KnownProperties.Resource.ConnectionProperties] =
new
(
1532
["container.ports"] =
new
(
1540
["resource.exitCode"] =
new
(
1548
["resource.enabled"] =
new
(
ResourceOutgoingPeerResolverTests.cs (3)
583
[KnownProperties.Resource.ConnectionString] =
new
(
597
properties[KnownProperties.Resource.ConnectionProperties] =
new
(
619
[KnownProperties.Parameter.Value] =
new
(
Shared\MockDashboardClient.cs (1)
23
new
ResourcePropertyViewModel
(
Terminal\DefaultTerminalConnectionResolverTests.cs (1)
173
return new
ResourcePropertyViewModel
(
88 references to ResourcePropertyViewModel
Aspire.Dashboard (28)
Components\Controls\ParameterOverview.razor.cs (1)
97
if (Resource.Properties.TryGetValue(KnownProperties.Parameter.Value, out
var
property))
Components\Controls\ResourceDetails.razor.cs (2)
147
foreach (
var
property in _resource.Properties.Values)
149
var
displayedProperty = property;
Components\Legacy\Pages\Resources.razor.cs (1)
865
if (resource.Properties.TryGetValue(KnownProperties.Parameter.Value, out
var
property))
Components\Pages\ResourceOverview.Details.cs (2)
84
foreach (
var
property in resource.Properties.Values)
91
var
displayedProperty = property;
Components\Pages\Resources.razor.cs (1)
928
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 (12)
46
public required ImmutableDictionary<string,
ResourcePropertyViewModel
> Properties { get; init; }
59
Properties.TryGetValue(KnownProperties.Resource.TraitPrefix + name, out
var
property) && property.Value.KindCase == Value.KindOneofCase.ListValue
66
Properties.TryGetValue(KnownProperties.Resource.DisplayOrder, out
var
property) &&
77
Properties.TryGetValue(KnownProperties.Container.Lifetime, out
var
lifetime) &&
106
if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out
var
connectionStringProperty) &&
115
if (Properties.TryGetValue(KnownProperties.Parameter.Value, out
var
parameterValueProperty) &&
134
if (Properties.TryGetValue(KnownProperties.Resource.ConnectionString, out
var
connectionStringProperty) &&
146
if (!Properties.TryGetValue(KnownProperties.Resource.ConnectionProperties, out
var
connectionPropertiesProperty) ||
200
if (Properties.TryGetValue(propertyName, out
var
value))
394
private readonly
ResourcePropertyViewModel
_propertyViewModel;
421
public DisplayedResourcePropertyViewModel(
ResourcePropertyViewModel
propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider)
467
private static string? GetTraitText(
ResourcePropertyViewModel
propertyViewModel) =>
Model\ResourceViewModelExtensions.cs (4)
210
if (resource.Properties.TryGetValue(key, out
var
property) && property.Value.TryConvertToString(out var valueString))
222
if (resource.Properties.TryGetValue(key, out
var
property) && property is { Value: { ListValue: not null } value })
247
if (resource.Properties.TryGetValue(key, out
var
property) && property is { Value: { ListValue: not null } value })
272
if (resource.Properties.TryGetValue(key, out
var
property) && property.Value.TryConvertToInt(out i))
ServiceClient\Partials.cs (3)
171
private ImmutableDictionary<string,
ResourcePropertyViewModel
> CreatePropertyViewModels(string resourceType, RepeatedField<ResourceProperty> properties, IKnownPropertyLookup knownPropertyLookup, ILogger logger)
173
var builder = ImmutableDictionary.CreateBuilder<string,
ResourcePropertyViewModel
>(StringComparers.ResourcePropertyName);
181
var
propertyViewModel = new ResourcePropertyViewModel(
Aspire.Dashboard.Components.Tests (23)
Controls\ResourceDetailsTests.cs (12)
464
properties: new Dictionary<string,
ResourcePropertyViewModel
>
499
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
531
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
592
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
650
static
ResourcePropertyViewModel
Trait(string name, params string[] values) => new(
808
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
854
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
900
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
930
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
957
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
982
Dictionary<string,
ResourcePropertyViewModel
> properties,
1008
private static
ResourcePropertyViewModel
CreateParameterValueProperty(string value, bool isValueSensitive = false)
Layout\ResourcesLayoutTests.cs (2)
550
Properties = System.Collections.Immutable.ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
949
Dictionary<string,
ResourcePropertyViewModel
> Tags(params string[] tags) => new()
Pages\ResourceOverviewTypeDisplayNameTests.cs (1)
79
private static Dictionary<string,
ResourcePropertyViewModel
> CreateTypeProperty(string resourceType) => new()
Pages\ResourcesTests.cs (6)
198
var childProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
1059
ImmutableDictionary<string,
ResourcePropertyViewModel
>? properties = null,
1081
Properties = properties ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
1311
var parameterProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
1373
var parameterProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
1417
var parameterProperties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
49
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
Aspire.Dashboard.Playwright.Tests (9)
Integration\Playwright\ResourcePanelNavigationTests.cs (1)
505
properties: new Dictionary<string,
ResourcePropertyViewModel
>
Integration\Playwright\ResourcePaneResponsiveTests.cs (1)
2794
var properties = ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty.Add(tagKey,
Integration\Playwright\TemplateResourceAssertionsTests.cs (1)
85
properties: new Dictionary<string,
ResourcePropertyViewModel
>
Integration\Playwright\TerminalDockTests.cs (1)
488
properties: new Dictionary<string,
ResourcePropertyViewModel
>
Integration\Playwright\TerminalTests.cs (2)
670
properties: new Dictionary<string,
ResourcePropertyViewModel
>
683
private static
ResourcePropertyViewModel
StringProperty(string name, string value) =>
tests\Aspire.Dashboard.Tests\Shared\MockDashboardClient.cs (1)
21
new KeyValuePair<string,
ResourcePropertyViewModel
>(
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
49
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,
Aspire.Dashboard.Tests (28)
Model\ResourceIconHelpersTests.cs (1)
118
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
Model\ResourceMenuBuilderTests.cs (1)
252
var resource = ModelTestHelpers.CreateResource(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 (4)
17
properties: new Dictionary<string,
ResourcePropertyViewModel
>
43
var properties = new Dictionary<string,
ResourcePropertyViewModel
>();
66
properties: new Dictionary<string,
ResourcePropertyViewModel
>
84
private static
ResourcePropertyViewModel
StringProperty(string name, string value)
Model\ResourceViewModelTests.cs (5)
212
var
property = vm.Properties[KnownProperties.Container.Image];
254
var
property = vm.Properties[propertyName];
289
var
property = vm.Properties[KnownProperties.Container.Image];
339
var
image = vm.Properties[KnownProperties.Container.Image];
345
var
id = vm.Properties[KnownProperties.Container.Id];
Model\TelemetryExportServiceTests.cs (2)
1396
properties: new Dictionary<string,
ResourcePropertyViewModel
>
1530
properties: new Dictionary<string,
ResourcePropertyViewModel
>
ResourceOutgoingPeerResolverTests.cs (2)
581
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
617
var properties = new Dictionary<string,
ResourcePropertyViewModel
>
Shared\MockDashboardClient.cs (1)
21
new KeyValuePair<string,
ResourcePropertyViewModel
>(
Terminal\DefaultTerminalConnectionResolverTests.cs (4)
101
properties: new Dictionary<string,
ResourcePropertyViewModel
>
121
properties: new Dictionary<string,
ResourcePropertyViewModel
>
164
properties: new Dictionary<string,
ResourcePropertyViewModel
>
171
private static
ResourcePropertyViewModel
StringProperty(string name, string value)
tests\Shared\DashboardModel\ModelTestHelpers.cs (2)
18
Dictionary<string,
ResourcePropertyViewModel
>? properties = null,
49
Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string,
ResourcePropertyViewModel
>.Empty,