212 instantiations of ResourcePropertySnapshot
Aspire.Hosting (38)
Dcp\ResourceSnapshotBuilder.cs (24)
63new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
64new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
123new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
124new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
200new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
201new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
223new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
224new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
274directProperties.Add(new(KnownProperties.Project.LaunchCommand, "direct"));
277directProperties.Add(new(KnownProperties.Project.Configuration, directBuildConfiguration));
281directProperties.Add(new(KnownProperties.Project.TargetPath, buildTarget.TargetPath));
282directProperties.Add(new(KnownProperties.Project.UseAppHost, buildTarget.UseAppHost));
303? [new(KnownProperties.Project.LaunchCommand, "ide"), new(KnownProperties.Project.Configuration, buildConfiguration)]
304: [new(KnownProperties.Project.LaunchCommand, "ide")];
310return [new(KnownProperties.Project.LaunchCommand, null)];
317return [new(KnownProperties.Project.LaunchCommand, null)];
344return [new(KnownProperties.Project.LaunchCommand, null)];
354return [new(KnownProperties.Project.LaunchCommand, null)];
374return [new(KnownProperties.Project.LaunchCommand, null)];
384return [new(KnownProperties.Project.LaunchCommand, null)];
391properties.Add(new(KnownProperties.Project.LaunchCommand, launchCommand));
394properties.Add(new(KnownProperties.Project.Configuration, configuration));
399properties.Add(new(KnownProperties.Project.TargetFramework, targetFramework));
Aspire.Hosting.Azure (11)
Aspire.Hosting.Azure.EntraId (1)
Aspire.Hosting.Azure.EntraId.Tests (12)
EntraIdInitializationTests.cs (12)
41new("entra.tenant.id", TenantId) { DisplayName = "Tenant ID", IsHighlighted = true, SortOrder = 0 },
42new("entra.client.id", ClientId) { DisplayName = "Client ID", IsHighlighted = true, SortOrder = 1 },
43new("entra.signin.audience", "AzureADMyOrg") { DisplayName = "Sign-in audience", IsHighlighted = true, SortOrder = 2 },
44new("entra.instance", "https://login.microsoftonline.com/") { DisplayName = "Instance", IsHighlighted = true, SortOrder = 3 }
61new ResourcePropertySnapshot("entra.credentials", "ClientSecret, SignedAssertionFromManagedIdentity")
93new ResourcePropertySnapshot("entra.signin.audience", "AzureADMultipleOrgs")
136new("entra.tenant.id", TenantId) { DisplayName = "Tenant ID", IsHighlighted = true, IsSensitive = false, SortOrder = 0 },
137new("entra.client.id", ClientId) { DisplayName = "Client ID", IsHighlighted = true, IsSensitive = true, SortOrder = 1 }
214new ResourcePropertySnapshot("entra.tenant.id", TenantId) { DisplayName = "Tenant ID", IsHighlighted = true, SortOrder = 0 },
215new ResourcePropertySnapshot("entra.client.id", ClientId) { DisplayName = "Client ID", IsHighlighted = true, SortOrder = 1 }
319Properties = [new("custom", "value")]
440Properties = [new ResourcePropertySnapshot("custom", "value")]
Aspire.Hosting.Azure.Tests (25)
AzureEnvironmentResourceExtensionsTests.cs (22)
631new("azure.subscription.id", "sub")
644new("azure.subscription.id", "sub"),
645new(CustomResourceKnownProperties.Source, "deployment-id"),
646new("custom.property", "keep")
1436new("azure.provisioning.error.code", "LocationNotAvailableForResourceType"),
1437new("azure.provisioning.error.message", "old failure"),
1438new("azure.subscription.id", "12345678-1234-1234-1234-123456789012"),
1439new("custom.property", "kept")
1463new("azure.subscription.id", "12345678-1234-1234-1234-123456789012"),
1464new("custom.property", "kept")
2420Properties = [new(CustomResourceKnownProperties.Source, "storage-deployment"), new("custom.property", "keep-storage")]
2427Properties = [new(CustomResourceKnownProperties.Source, "storage2-deployment"), new("custom.property", "keep-storage2")]
3341Properties = [new("azure.location", "westus2")]
3401Properties = [new("azure.location", "westus2")]
3527Properties = [new("azure.location", "westus2")]
3590Properties = [new("azure.location", "westus2")]
3662Properties = [new("azure.location", "westus2")]
3934Properties = [new("azure.location", "westus2")]
4079new("azure.location", "westus3"),
4080new("azure.subscription.id", "12345678-1234-1234-1234-123456789012")
Aspire.Hosting.Blazor (3)
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)
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)
Aspire.Hosting.DevTunnels (11)
DevTunnelResourceBuilderExtensions.cs (11)
111new("TunnelId", tunnelId)
707new(CustomResourceKnownProperties.Source, $"{targetResource.Name}/{targetEndpoint.EndpointName}"),
708new("TargetResource", targetResource.Name),
709new("TargetEndpoint", targetEndpoint.EndpointName),
710new("Protocol", portOptions.Protocol),
711new("Description", portOptions.Description),
712new("Labels", portOptions.Labels is null ? "" : $"{string.Join(", ", portOptions.Labels)}"),
810ResourcePropertySnapshot[] policyProperties = effectivePolicy is null ? [] : [new("Anonymous access", effectivePolicy)];
890new(DevTunnelPortResource.TunnelUrlPropertyName, NormalizeUrl(portUri))
899properties.Add(new(DevTunnelPortResource.InspectUrlPropertyName, inspectUrl)
908properties.Add(new(DevTunnelPortResource.LocalEndpointUrlPropertyName, localUrl)
Aspire.Hosting.Foundry (6)
Aspire.Hosting.MongoDB.Tests (2)
Aspire.Hosting.MySql.Tests (2)
Aspire.Hosting.OpenAI (4)
Aspire.Hosting.PostgreSQL.Tests (2)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.SqlServer.Tests (2)
Aspire.Hosting.Tests (33)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (11)
242new ResourcePropertySnapshot(CustomResourceKnownProperties.Source, "normal-value"),
243new ResourcePropertySnapshot("ConnectionString", "secret-value") { IsSensitive = true }
1303new ResourcePropertySnapshot("number", 42),
1304new ResourcePropertySnapshot("flag", true),
1305new ResourcePropertySnapshot("list", new[] { "one", "two" }),
1306new ResourcePropertySnapshot("ConnectionString", "secret-value") { IsSensitive = true }
1343new ResourcePropertySnapshot("number", 42),
1344new ResourcePropertySnapshot("flag", true),
1345new ResourcePropertySnapshot("list", new[] { "one", "two" }),
1346new ResourcePropertySnapshot("object", new KeyValuePair<string, string>[]
1351new ResourcePropertySnapshot("ConnectionString", "secret-value") { IsSensitive = true }
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();
838Properties = [new ResourcePropertySnapshot(KnownProperties.Resource.WaitingFor, new[] { "dependency" })]
868Properties = [new ResourcePropertySnapshot(KnownProperties.Resource.WaitingFor, new[] { dependency.Name })]
1784new("Ports", ImmutableArray.Create(8080, 8081))
1791new("Args", new List<string> { "--verbose", "--port", "8080" }),
1792new("Tags", new[] { "a", "b" })
1827new("Ports", ImmutableArray.Create(8080, 8081)),
1828new("Args", new List<string> { "--verbose", "--port", "9090" }),
1829new("Tags", new[] { "a", "b" })
1890new ResourcePropertySnapshot("property", new List<string> { "original" })
Aspire.Hosting.Valkey.Tests (2)
CustomResources.AppHost (5)
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))]
172 references to ResourcePropertySnapshot
Aspire.Hosting (32)
Aspire.Hosting.Azure (46)
Aspire.Hosting.Azure.EntraId (2)
Aspire.Hosting.Azure.EntraId.Tests (2)
Aspire.Hosting.Azure.Tests (13)
AzureBicepProvisionerTests.cs (6)
1328static void AssertResourceProperty(ResourcePropertySnapshot property, string name, object value)
1334static string[] AssertStringArrayProperty(ResourcePropertySnapshot property, string name)
1899var property = Assert.Single(resourceEvent.Snapshot.Properties, p => p.Name == "azure.resource.group");
1904private static void AssertHighlightedContextProperty(IEnumerable<ResourcePropertySnapshot> properties, string name, object value, string displayName)
1906var property = Assert.Single(properties, p => p.Name == name);
1910private static void AssertHighlightedResourceProperty(ResourcePropertySnapshot property, string name, object value, string displayName)
Aspire.Hosting.Blazor.Tests (1)
Aspire.Hosting.Browsers (24)
Aspire.Hosting.Browsers.Tests (25)
Aspire.Hosting.DevTunnels (3)
Aspire.Hosting.Tests (24)