164 instantiations of ResourcePropertySnapshot
Aspire.Hosting (20)
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 },
Aspire.Hosting.Azure (11)
Aspire.Hosting.Azure.Tests (25)
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)
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)
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)
Aspire.Hosting.GitHub.Models (2)
Aspire.Hosting.OpenAI (4)
Aspire.Hosting.Tests (29)
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 }
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)
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)
Aspire.Hosting.Azure (46)
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)
Aspire.Hosting.Browsers (24)
Aspire.Hosting.Browsers.Tests (25)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Tests (17)