164 instantiations of ResourcePropertySnapshot
Aspire.Hosting (20)
ApplicationModel\DotnetToolResource.cs (2)
53yield return new(KnownProperties.Resource.Source, toolConfig.PackageId); 58return new(name, value)
ApplicationModel\ParameterResource.cs (1)
96return new(KnownProperties.Parameter.Value, value)
ApplicationModel\TerminalResourceSnapshotProperties.cs (4)
57.Add(new ResourcePropertySnapshot(KnownProperties.Terminal.Enabled, "true") { IsSensitive = false }) 58.Add(new ResourcePropertySnapshot(KnownProperties.Terminal.ReplicaIndex, replicaIndex.ToString(CultureInfo.InvariantCulture)) { IsSensitive = false }) 59.Add(new ResourcePropertySnapshot(KnownProperties.Terminal.ReplicaCount, replicaCount.ToString(CultureInfo.InvariantCulture)) { IsSensitive = false }); 68new ResourcePropertySnapshot(KnownProperties.Terminal.ConsumerUdsPath, consumerUdsPath) { IsSensitive = true });
Dashboard\ResourcePropertySnapshotMetadata.cs (1)
24return new(name, value)
Dcp\ResourceSnapshotBuilder.cs (8)
62new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 63new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false }, 122new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 123new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false }, 191new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 192new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false }, 213new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 214new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
Orchestrator\ApplicationOrchestrator.cs (2)
108new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }, 109new(CustomResourceKnownProperties.ConnectionProperties, connectionProperties) { IsSensitive = true }
ParameterResourceBuilderExtensions.cs (1)
305new(CustomResourceKnownProperties.Source, resource.ConfigurationKey)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35return [.. properties, new ResourcePropertySnapshot(name, value) { IsSensitive = isSensitive, DisplayName = displayName, IsHighlighted = isHighlighted, SortOrder = sortOrder }];
Aspire.Hosting.Azure (11)
AzureProvisioningFailureDetails.cs (1)
451=> new($"{PropertyPrefix}{name}", value) { DisplayName = displayName, IsHighlighted = true };
AzureResourceProperties.cs (1)
95new(name, value)
Provisioning\Provisioners\BicepProvisioner.cs (8)
143.SetResourcePropertyRange([new(CustomResourceKnownProperties.Source, deploymentId)]); 1125properties.Add(new("azure.deployment.operations.total", summary.Operations.Length)); 1126properties.Add(new("azure.deployment.operations.running", summary.RunningOperations.Length)); 1127properties.Add(new("azure.deployment.operations.succeeded", summary.SucceededOperations.Length)); 1128properties.Add(new("azure.deployment.operations.failed", summary.FailedOperations.Length)); 1129properties.Add(new("azure.deployment.operations.canceled", summary.CanceledOperations.Length)); 1143properties.Add(new(propertyName, labels)); 1182return new(DeploymentOperationSummaryPropertyName, value)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35return [.. properties, new ResourcePropertySnapshot(name, value) { IsSensitive = isSensitive, DisplayName = displayName, IsHighlighted = isHighlighted, SortOrder = sortOrder }];
Aspire.Hosting.Azure.Tests (25)
AzureBicepProvisionerTests.cs (3)
1266new("azure.deployment.operations.total", 2), 1267new("azure.deployment.operations.succeeded", 1), 1268new("azure.deployment.operations.succeeded.resources", new[] { "old-search (Microsoft.Search/searchServices)" })
AzureEnvironmentResourceExtensionsTests.cs (22)
335new("azure.subscription.id", "sub") 348new("azure.subscription.id", "sub"), 349new(CustomResourceKnownProperties.Source, "deployment-id"), 350new("custom.property", "keep") 1118new("azure.provisioning.error.code", "LocationNotAvailableForResourceType"), 1119new("azure.provisioning.error.message", "old failure"), 1120new("azure.subscription.id", "12345678-1234-1234-1234-123456789012"), 1121new("custom.property", "kept") 1145new("azure.subscription.id", "12345678-1234-1234-1234-123456789012"), 1146new("custom.property", "kept") 2102Properties = [new(CustomResourceKnownProperties.Source, "storage-deployment"), new("custom.property", "keep-storage")] 2109Properties = [new(CustomResourceKnownProperties.Source, "storage2-deployment"), new("custom.property", "keep-storage2")] 3023Properties = [new("azure.location", "westus2")] 3083Properties = [new("azure.location", "westus2")] 3209Properties = [new("azure.location", "westus2")] 3272Properties = [new("azure.location", "westus2")] 3344Properties = [new("azure.location", "westus2")] 3616Properties = [new("azure.location", "westus2")] 3761new("azure.location", "westus3"), 3762new("azure.subscription.id", "12345678-1234-1234-1234-123456789012")
Aspire.Hosting.Blazor (2)
BlazorGatewayExtensions.cs (2)
143new(CustomResourceKnownProperties.Source, Path.GetFileName(projectPath)) 167new(CustomResourceKnownProperties.Source, Path.GetFileName(resolvedPath))
Aspire.Hosting.Browsers (18)
BrowserLogsBuilderExtensions.cs (8)
298new(CustomResourceKnownProperties.Source, resourceName), 299new(BrowserPropertyName, configuration.Browser), 300new(UserDataModePropertyName, configuration.UserDataMode.ToString()) 305properties.Add(new ResourcePropertySnapshot(ProfilePropertyName, profile)); 310new ResourcePropertySnapshot(ActiveSessionCountPropertyName, 0), 311new ResourcePropertySnapshot(ActiveSessionsPropertyName, "None"), 312new ResourcePropertySnapshot(BrowserSessionsPropertyName, "[]"), 313new ResourcePropertySnapshot(TotalSessionsLaunchedPropertyName, 0)
BrowserLogsSessionManager.cs (9)
441yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.ActiveSessionCountPropertyName, resourceState.ActiveSessions.Count); 442yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.ActiveSessionsPropertyName, FormatActiveSessions(resourceState.ActiveSessions.Values)); 443yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.BrowserSessionsPropertyName, FormatBrowserSessions(resourceState.ActiveSessions.Values)); 444yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.TotalSessionsLaunchedPropertyName, resourceState.TotalSessionsLaunched); 448yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.LastSessionPropertyName, resourceState.LastSessionId); 453yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.TargetUrlPropertyName, resourceState.LastTargetUrl); 458yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.BrowserExecutablePropertyName, resourceState.LastBrowserExecutable); 463yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.BrowserHostOwnershipPropertyName, resourceState.LastBrowserHostOwnership); 468yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.LastErrorPropertyName, resourceState.LastError);
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35return [.. properties, new ResourcePropertySnapshot(name, value) { IsSensitive = isSensitive, DisplayName = displayName, IsHighlighted = isHighlighted, SortOrder = sortOrder }];
Aspire.Hosting.Browsers.Tests (18)
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (8)
298new(CustomResourceKnownProperties.Source, resourceName), 299new(BrowserPropertyName, configuration.Browser), 300new(UserDataModePropertyName, configuration.UserDataMode.ToString()) 305properties.Add(new ResourcePropertySnapshot(ProfilePropertyName, profile)); 310new ResourcePropertySnapshot(ActiveSessionCountPropertyName, 0), 311new ResourcePropertySnapshot(ActiveSessionsPropertyName, "None"), 312new ResourcePropertySnapshot(BrowserSessionsPropertyName, "[]"), 313new ResourcePropertySnapshot(TotalSessionsLaunchedPropertyName, 0)
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (9)
441yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.ActiveSessionCountPropertyName, resourceState.ActiveSessions.Count); 442yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.ActiveSessionsPropertyName, FormatActiveSessions(resourceState.ActiveSessions.Values)); 443yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.BrowserSessionsPropertyName, FormatBrowserSessions(resourceState.ActiveSessions.Values)); 444yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.TotalSessionsLaunchedPropertyName, resourceState.TotalSessionsLaunched); 448yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.LastSessionPropertyName, resourceState.LastSessionId); 453yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.TargetUrlPropertyName, resourceState.LastTargetUrl); 458yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.BrowserExecutablePropertyName, resourceState.LastBrowserExecutable); 463yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.BrowserHostOwnershipPropertyName, resourceState.LastBrowserHostOwnership); 468yield return new ResourcePropertySnapshot(BrowserLogsBuilderExtensions.LastErrorPropertyName, resourceState.LastError);
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35return [.. properties, new ResourcePropertySnapshot(name, value) { IsSensitive = isSensitive, DisplayName = displayName, IsHighlighted = isHighlighted, SortOrder = sortOrder }];
Aspire.Hosting.DevTunnels (11)
DevTunnelResourceBuilderExtensions.cs (11)
113new("TunnelId", tunnelId) 678new(CustomResourceKnownProperties.Source, $"{targetResource.Name}/{targetEndpoint.EndpointName}"), 679new("TargetResource", targetResource.Name), 680new("TargetEndpoint", targetEndpoint.EndpointName), 681new("Protocol", portOptions.Protocol), 682new("Description", portOptions.Description), 683new("Labels", portOptions.Labels is null ? "" : $"{string.Join(", ", portOptions.Labels)}"), 762new("Anonymous access", effectivePolicy) 842new(DevTunnelPortResource.TunnelUrlPropertyName, NormalizeUrl(portUri)) 851properties.Add(new(DevTunnelPortResource.InspectUrlPropertyName, inspectUrl) 860properties.Add(new(DevTunnelPortResource.LocalEndpointUrlPropertyName, localUrl)
Aspire.Hosting.Foundry (4)
FoundryExtensions.cs (4)
316Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")] 324Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")] 353Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, model)] 379Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, $"{model} ({deployment.ModelId})")]
Aspire.Hosting.GitHub.Models (2)
GitHubModelsExtensions.cs (2)
62new(CustomResourceKnownProperties.Source, "GitHub Models") 76Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.OpenAI (4)
OpenAIExtensions.cs (4)
73new(CustomResourceKnownProperties.Source, "OpenAI") 87Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }] 122new(CustomResourceKnownProperties.Source, "OpenAI Models") 133Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.Tests (29)
Backchannel\AppHostBackchannelTests.cs (2)
63Properties = [new("A", "B"), new("c", "d")],
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (11)
242new ResourcePropertySnapshot(CustomResourceKnownProperties.Source, "normal-value"), 243new ResourcePropertySnapshot("ConnectionString", "secret-value") { IsSensitive = true } 1261new ResourcePropertySnapshot("number", 42), 1262new ResourcePropertySnapshot("flag", true), 1263new ResourcePropertySnapshot("list", new[] { "one", "two" }), 1264new ResourcePropertySnapshot("ConnectionString", "secret-value") { IsSensitive = true } 1301new ResourcePropertySnapshot("number", 42), 1302new ResourcePropertySnapshot("flag", true), 1303new ResourcePropertySnapshot("list", new[] { "one", "two" }), 1304new ResourcePropertySnapshot("object", new KeyValuePair<string, string>[] 1309new ResourcePropertySnapshot("ConnectionString", "secret-value") { IsSensitive = true }
Dashboard\ResourcePublisherTests.cs (1)
18new ResourcePropertySnapshot(
ResourceNotificationTests.cs (15)
34Properties = [new("A", "B")], 122await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(new("A", "value")) }).DefaultTimeout(); 124await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(new("B", "value")) }).DefaultTimeout(); 200await notificationService.PublishUpdateAsync(resource1, state => state with { Properties = state.Properties.Add(new("A", "value")) }).DefaultTimeout(); 202await notificationService.PublishUpdateAsync(resource2, state => state with { Properties = state.Properties.Add(new("B", "value")) }).DefaultTimeout(); 204await notificationService.PublishUpdateAsync(resource1, "replica1", state => state with { Properties = state.Properties.Add(new("C", "value")) }).DefaultTimeout(); 792Properties = [new ResourcePropertySnapshot(KnownProperties.Resource.WaitingFor, new[] { "dependency" })] 822Properties = [new ResourcePropertySnapshot(KnownProperties.Resource.WaitingFor, new[] { dependency.Name })] 1493new("Ports", ImmutableArray.Create(8080, 8081)) 1500new("Args", new List<string> { "--verbose", "--port", "8080" }), 1501new("Tags", new[] { "a", "b" }) 1536new("Ports", ImmutableArray.Create(8080, 8081)), 1537new("Args", new List<string> { "--verbose", "--port", "9090" }), 1538new("Tags", new[] { "a", "b" }) 1599new ResourcePropertySnapshot("property", new List<string> { "original" })
CustomResources.AppHost (5)
TalkingClockResource.cs (2)
50new(CustomResourceKnownProperties.Source, "Talking Clock") 137new(CustomResourceKnownProperties.Source, "Talking Clock")
TestResource.cs (3)
22new("P1", "P2"), 23new(CustomResourceKnownProperties.Source, "Custom") 56Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
Stress.AppHost (15)
TestResource.cs (15)
23new("P1", "P2"), 24new(CustomResourceKnownProperties.Source, "Custom") 41new("P1", "P2"), 42new(CustomResourceKnownProperties.Source, "Custom"), 43new(KnownProperties.Resource.ParentName, parent.Name) 60new(KnownProperties.Resource.ParentName, parent.Name) 77new(KnownProperties.Resource.ParentName, parent.Name) 93new(CustomResourceKnownProperties.Source, "Custom") 110new(KnownProperties.Executable.Path, "/stress/known/path") 114new(KnownProperties.Executable.Args, "--api-key stress-secret-value") 119new("stress.property.highlighted", "Visible highlighted value") 124new("stress.property.highlightedSecret", "Visible highlighted sensitive value") 130new("stress.property.hidden", "Hidden until Show all is selected") 134new("stress.property.hiddenSecret", "Hidden sensitive value until Show all is selected") 170Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
154 references to ResourcePropertySnapshot
Aspire.Hosting (27)
ApplicationModel\CustomResourceSnapshot.cs (5)
35public required ImmutableArray<ResourcePropertySnapshot> Properties { get; init; } 207private static bool PropertiesContentEqual(ImmutableArray<ResourcePropertySnapshot> x, ImmutableArray<ResourcePropertySnapshot> y) 225private static bool ResourcePropertyContentEquals(ResourcePropertySnapshot x, ResourcePropertySnapshot y)
ApplicationModel\DotnetToolResource.cs (2)
43internal IEnumerable<ResourcePropertySnapshot> CreateSnapshotProperties() 56private static ResourcePropertySnapshot CreateHighlightedProperty(string name, object? value, string displayName, int sortOrder)
ApplicationModel\ParameterResource.cs (1)
94internal ResourcePropertySnapshot CreateValueSnapshotProperty(string value)
ApplicationModel\ResourceNotificationService.cs (2)
1355private static bool TryGetWaitingForDependencies(ImmutableArray<ResourcePropertySnapshot> properties, [NotNullWhen(true)] out string[]? dependencies) 1357foreach (var property in properties)
ApplicationModel\TerminalResourceSnapshotProperties.cs (2)
35public static ImmutableArray<ResourcePropertySnapshot> AddTerminalProperties( 38ImmutableArray<ResourcePropertySnapshot> properties)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1152foreach (var prop in stampedProperties)
Dashboard\GenericResourceSnapshot.cs (1)
15foreach (var property in state.Properties)
Dashboard\ResourcePropertySnapshotMetadata.cs (1)
20internal static ResourcePropertySnapshot Create(string resourceType, string name, object? value, bool isSensitive = false)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11internal static ImmutableArray<ResourcePropertySnapshot> SetResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null) 15var property = properties[i]; 38internal static ImmutableArray<ResourcePropertySnapshot> SetResourcePropertyRange(this ImmutableArray<ResourcePropertySnapshot> properties, IEnumerable<ResourcePropertySnapshot> newValues) 40var existingProperties = new List<ResourcePropertySnapshot>(properties); 41var propertiesToAdd = new List<ResourcePropertySnapshot>(); 43foreach (var newValue in newValues) 48var existingProperty = existingProperties[i]; 71internal static ImmutableArray<ResourcePropertySnapshot> RemoveResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name)
Aspire.Hosting.Azure (46)
AzureEnvironmentResourceExtensions.cs (1)
49Properties = ImmutableArray<ResourcePropertySnapshot>.Empty
AzureProvisioningController.cs (6)
1096private static ImmutableArray<ResourcePropertySnapshot> CreateAzureEnvironmentFailureProperties(IReadOnlyList<(IResource Resource, IAzureResource AzureResource)> azureResources) 4119private static ImmutableArray<ResourcePropertySnapshot> FilterProperties(ImmutableArray<ResourcePropertySnapshot> properties) 4157ImmutableArray<ResourcePropertySnapshot> additionalProperties, 4166? ImmutableArray<ResourcePropertySnapshot>.Empty 4194private static ImmutableArray<ResourcePropertySnapshot> BuildAzureEnvironmentProperties(AzureContextState context)
AzureProvisioningFailureDetails.cs (6)
387internal ImmutableArray<ResourcePropertySnapshot> SetResourceProperties(ImmutableArray<ResourcePropertySnapshot> properties, string fallbackOperation) 389var failureProperties = ImmutableArray.CreateBuilder<ResourcePropertySnapshot>(); 450internal static ResourcePropertySnapshot CreateHighlightedFailureProperty(string name, object value, string displayName) 795internal static ImmutableArray<ResourcePropertySnapshot> WithoutAzureProvisioningFailureProperties(this ImmutableArray<ResourcePropertySnapshot> properties)
AzureResourceProperties.cs (14)
32public static ImmutableArray<ResourcePropertySnapshot> CreateContextProperties( 40var properties = ImmutableArray.CreateBuilder<ResourcePropertySnapshot>(); 51public static ResourcePropertySnapshot CreateSubscriptionId(string? value) => 54public static ResourcePropertySnapshot CreateResourceGroup(string? value) => 57public static ResourcePropertySnapshot CreateLocation(string? value) => 60public static ResourcePropertySnapshot CreateTenantId(string? value) => 63public static ResourcePropertySnapshot CreateTenantDomain(string? value) => 66public static ImmutableArray<ResourcePropertySnapshot> CreateActiveOperationProperties( 73var properties = ImmutableArray.CreateBuilder<ResourcePropertySnapshot>(); 83public static ImmutableArray<ResourcePropertySnapshot> WithoutActiveOperationProperties(this ImmutableArray<ResourcePropertySnapshot> properties) 94private static ResourcePropertySnapshot CreateHighlighted(string name, string? value, string displayName) => 101private static void Add(ImmutableArray<ResourcePropertySnapshot>.Builder properties, Func<string?, ResourcePropertySnapshot> createProperty, string? value, bool includeEmptyProperties)
Provisioning\Provisioners\BicepProvisioner.cs (7)
821ImmutableArray<ResourcePropertySnapshot> properties = state.Properties.WithoutAzureProvisioningFailureProperties() 1116private static ImmutableArray<ResourcePropertySnapshot> CreateDeploymentOperationProperties(AzureDeploymentOperationSummary summary) 1118var properties = ImmutableArray.CreateBuilder<ResourcePropertySnapshot>(); 1148private static ResourcePropertySnapshot? CreateDeploymentOperationSummaryProperty(AzureDeploymentOperationSummary summary) 1180static ResourcePropertySnapshot CreateSummaryProperty(string value) 1190private static ImmutableArray<ResourcePropertySnapshot> WithoutDeploymentOperationProperties(ImmutableArray<ResourcePropertySnapshot> properties)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11internal static ImmutableArray<ResourcePropertySnapshot> SetResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null) 15var property = properties[i]; 38internal static ImmutableArray<ResourcePropertySnapshot> SetResourcePropertyRange(this ImmutableArray<ResourcePropertySnapshot> properties, IEnumerable<ResourcePropertySnapshot> newValues) 40var existingProperties = new List<ResourcePropertySnapshot>(properties); 41var propertiesToAdd = new List<ResourcePropertySnapshot>(); 43foreach (var newValue in newValues) 48var existingProperty = existingProperties[i]; 71internal static ImmutableArray<ResourcePropertySnapshot> RemoveResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name)
Aspire.Hosting.Azure.Tests (13)
AzureBicepProvisionerTests.cs (6)
1230static void AssertResourceProperty(ResourcePropertySnapshot property, string name, object value) 1236static string[] AssertStringArrayProperty(ResourcePropertySnapshot property, string name) 1801var property = Assert.Single(resourceEvent.Snapshot.Properties, p => p.Name == "azure.resource.group"); 1806private static void AssertHighlightedContextProperty(IEnumerable<ResourcePropertySnapshot> properties, string name, object value, string displayName) 1808var property = Assert.Single(properties, p => p.Name == name); 1812private static void AssertHighlightedResourceProperty(ResourcePropertySnapshot property, string name, object value, string displayName)
AzureEnvironmentResourceExtensionsTests.cs (7)
1000var resourceNameProperty = properties.Single(property => property.Name == "azure.provisioning.error.resource.name"); 1006var targetResourceIdProperty = properties.Single(property => property.Name == "azure.provisioning.error.target.resource.id"); 1116ImmutableArray<ResourcePropertySnapshot> properties = 1143ImmutableArray<ResourcePropertySnapshot> properties = 4855var failedResourcesProperty = Assert.Single(environmentEvent.Snapshot.Properties, property => property.Name == "azure.provisioning.error.failed.resources"); 5058private static void AssertHighlightedContextProperty(IEnumerable<ResourcePropertySnapshot> properties, string name, object value, string displayName) 5060var property = Assert.Single(properties, p => p.Name == name);
Aspire.Hosting.Browsers (24)
BrowserLogsBuilderExtensions.cs (2)
294static ImmutableArray<ResourcePropertySnapshot> CreateInitialProperties(string resourceName, BrowserConfiguration configuration) 296List<ResourcePropertySnapshot> properties =
BrowserLogsConfigurationManager.cs (4)
428private static System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> SetConfigurationProperties( 429System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> properties, 441private static System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> RemoveProperty( 442System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> properties,
BrowserLogsSessionManager.cs (6)
439private static IEnumerable<ResourcePropertySnapshot> GetPropertyUpdates(ResourceSessionState resourceState) 472private static ImmutableArray<ResourcePropertySnapshot> UpdateProperties( 473ImmutableArray<ResourcePropertySnapshot> properties, 475IEnumerable<ResourcePropertySnapshot> propertyUpdates) 500private static ImmutableArray<ResourcePropertySnapshot> RemoveProperty(ImmutableArray<ResourcePropertySnapshot> properties, string name)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11internal static ImmutableArray<ResourcePropertySnapshot> SetResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null) 15var property = properties[i]; 38internal static ImmutableArray<ResourcePropertySnapshot> SetResourcePropertyRange(this ImmutableArray<ResourcePropertySnapshot> properties, IEnumerable<ResourcePropertySnapshot> newValues) 40var existingProperties = new List<ResourcePropertySnapshot>(properties); 41var propertiesToAdd = new List<ResourcePropertySnapshot>(); 43foreach (var newValue in newValues) 48var existingProperty = existingProperties[i]; 71internal static ImmutableArray<ResourcePropertySnapshot> RemoveResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name)
Aspire.Hosting.Browsers.Tests (25)
BrowserLogsBuilderExtensionsTests.cs (1)
1753var property = snapshot.Properties.Single(property => property.Name == BrowserLogsBuilderExtensions.BrowserSessionsPropertyName);
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (2)
294static ImmutableArray<ResourcePropertySnapshot> CreateInitialProperties(string resourceName, BrowserConfiguration configuration) 296List<ResourcePropertySnapshot> properties =
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (4)
428private static System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> SetConfigurationProperties( 429System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> properties, 441private static System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> RemoveProperty( 442System.Collections.Immutable.ImmutableArray<ResourcePropertySnapshot> properties,
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (6)
439private static IEnumerable<ResourcePropertySnapshot> GetPropertyUpdates(ResourceSessionState resourceState) 472private static ImmutableArray<ResourcePropertySnapshot> UpdateProperties( 473ImmutableArray<ResourcePropertySnapshot> properties, 475IEnumerable<ResourcePropertySnapshot> propertyUpdates) 500private static ImmutableArray<ResourcePropertySnapshot> RemoveProperty(ImmutableArray<ResourcePropertySnapshot> properties, string name)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11internal static ImmutableArray<ResourcePropertySnapshot> SetResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null) 15var property = properties[i]; 38internal static ImmutableArray<ResourcePropertySnapshot> SetResourcePropertyRange(this ImmutableArray<ResourcePropertySnapshot> properties, IEnumerable<ResourcePropertySnapshot> newValues) 40var existingProperties = new List<ResourcePropertySnapshot>(properties); 41var propertiesToAdd = new List<ResourcePropertySnapshot>(); 43foreach (var newValue in newValues) 48var existingProperty = existingProperties[i]; 71internal static ImmutableArray<ResourcePropertySnapshot> RemoveResourceProperty(this ImmutableArray<ResourcePropertySnapshot> properties, string name)
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
833private static List<ResourcePropertySnapshot> GetUrlProperties(DevTunnelPortResource portResource) 840List<ResourcePropertySnapshot> properties =
Aspire.Hosting.Tests (17)
Dashboard\ResourcePublisherTests.cs (1)
202private static GenericResourceSnapshot CreateResourceSnapshot(string name, params ResourcePropertySnapshot[] properties)
Dcp\DcpExecutorTests.cs (2)
10260private static ResourcePropertySnapshot GetProperty(CustomResourceSnapshot snapshot, string name) 10267var property = GetProperty(snapshot, name);
Dcp\ResourceSnapshotBuilderTests.cs (4)
302private static ResourcePropertySnapshot GetProperty(CustomResourceSnapshot snapshot, string name) 309var property = GetProperty(snapshot, name); 318var property = GetProperty(snapshot, name); 327var property = GetProperty(snapshot, name);
DotnetToolResourceTests.cs (2)
24var sourceProperty = properties[KnownProperties.Resource.Source]; 31private static void AssertToolProperty(ResourcePropertySnapshot property, string expectedValue, string expectedDisplayName, int expectedSortOrder)
Orchestrator\ParameterProcessorTests.cs (1)
1336var property = Assert.Single(snapshot.Properties, p => p.Name == KnownProperties.Parameter.Value);
ResourceNotificationTests.cs (7)
1591var property = GetContentProperty(typeof(ResourcePropertySnapshot), propertyName); 1616$"Changing {nameof(ResourcePropertySnapshot)}.{propertyName} should publish a new snapshot."); 1621var property = resourceEvent.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.WaitingFor); 1629CreatePropertyTheoryData(typeof(ResourcePropertySnapshot)); 1688private static ResourcePropertySnapshot MutateProperty(ResourcePropertySnapshot snapshot, PropertyInfo property) 1692var mutated = snapshot with { };