1 write to Value
Aspire.Dashboard (1)
Model\ResourceViewModel.cs (1)
498Value = value;
42 references to Value
Aspire.Dashboard (36)
Components\Controls\ParameterOverview.razor.cs (2)
100if (!IsUnresolved && property.Value.HasStringValue) 102ParameterValue = property.Value.StringValue;
Components\Controls\ResourceDetails.razor.cs (1)
160value: property.Value,
Components\Legacy\Pages\Resources.razor.cs (2)
868var value = isUnresolved ? null : (property.Value.HasStringValue ? property.Value.StringValue : null);
Components\Pages\ResourceOverview.Details.cs (2)
86if (IsDisplayedOutsideProperties(resource, property.Name) || !HasValue(property.Value)) 101value: property.Value,
Components\Pages\Resources.razor.cs (2)
931var value = isUnresolved ? null : (property.Value.HasStringValue ? property.Value.StringValue : null);
Model\ResourceOutgoingPeerResolver.cs (2)
175return property1!.Value.Equals(property2!.Value);
Model\ResourceViewModel.cs (19)
59Properties.TryGetValue(KnownProperties.Resource.TraitPrefix + name, out var property) && property.Value.KindCase == Value.KindOneofCase.ListValue 60? property.Value.ListValue.Values.Where(v => v.HasStringValue).Select(v => v.StringValue).ToArray() 67property.Value.HasStringValue && 68int.TryParse(property.Value.StringValue, NumberStyles.Integer, CultureInfo.InvariantCulture, out var order) ? order : null; 78lifetime.Value.HasStringValue && 79string.Equals(lifetime.Value.StringValue, "Persistent", StringComparison.Ordinal); 107connectionStringProperty.Value.TryConvertToString(out var connectionString) && 116parameterValueProperty.Value.TryConvertToString(out var parameterValue) && 135connectionStringProperty.Value.TryConvertToString(out var connectionString) && 147connectionPropertiesProperty.Value.StructValue is not { } connectionProperties) 202if (value.Value.TryConvertToString(out var s)) 400public Value Value => _propertyViewModel.Value; 430_tooltip = new(() => propertyViewModel.Value.HasStringValue ? propertyViewModel.Value.StringValue : GetTraitText(propertyViewModel) ?? propertyViewModel.Value.ToString()); 434var value = propertyViewModel.Value is { HasStringValue: true, StringValue: var stringValue } 440: propertyViewModel.Value.ToString(); 468propertyViewModel.IsTrait && propertyViewModel.Value.KindCase == Value.KindOneofCase.ListValue 469? string.Join(", ", propertyViewModel.Value.ListValue.Values.Where(v => v.HasStringValue).Select(v => v.StringValue))
Model\ResourceViewModelExtensions.cs (5)
23if (property.Value.TryConvertToString(out var stringValue)) 210if (resource.Properties.TryGetValue(key, out var property) && property.Value.TryConvertToString(out var valueString)) 222if (resource.Properties.TryGetValue(key, out var property) && property is { Value: { ListValue: not null } value }) 247if (resource.Properties.TryGetValue(key, out var property) && property is { Value: { ListValue: not null } value }) 272if (resource.Properties.TryGetValue(key, out var property) && property.Value.TryConvertToInt(out i))
Model\TelemetryExportService.cs (1)
768p => ConvertPropertyValueToJsonNode(p.Value.Value))
Aspire.Dashboard.Components.Tests (1)
Pages\ResourcesTests.cs (1)
1345Assert.Equal("my-secret-value", resource.Properties[KnownProperties.Parameter.Value].Value.StringValue);
Aspire.Dashboard.Tests (5)
Model\ResourceViewModelTests.cs (3)
114Assert.Equal("two!", vm.Value.StringValue); 163Assert.Equal("Value1", p.Value.Value.StringValue); 175Assert.Equal("Value2", p.Value.Value.StringValue);
Model\SqliteResourceRepositoryTests.cs (2)
480Assert.Equal(nestedValue, actual.Properties["nested"].Value); 1047Assert.Equal(expected, resource.Properties["property"].Value.StringValue);