177 instantiations of ResourcePropertySnapshot
Aspire.Hosting (20)
ApplicationModel\DotnetToolResource.cs (2)
53
yield return
new
(KnownProperties.Resource.Source, toolConfig.PackageId);
58
return
new
(name, value)
ApplicationModel\ParameterResource.cs (1)
96
return
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 });
68
new
ResourcePropertySnapshot
(KnownProperties.Terminal.ConsumerUdsPath, consumerUdsPath) { IsSensitive = true });
Dashboard\ResourcePropertySnapshotMetadata.cs (1)
24
return
new
(name, value)
Dcp\ResourceSnapshotBuilder.cs (8)
62
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
63
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
122
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
123
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
191
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
192
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
213
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
214
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
Orchestrator\ApplicationOrchestrator.cs (2)
108
new
(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true },
109
new
(CustomResourceKnownProperties.ConnectionProperties, connectionProperties) { IsSensitive = true }
ParameterResourceBuilderExtensions.cs (1)
303
new
(CustomResourceKnownProperties.Source, resource.ConfigurationKey)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35
return [.. 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)
95
new
(name, value)
Provisioning\Provisioners\BicepProvisioner.cs (8)
139
.SetResourcePropertyRange([
new
(CustomResourceKnownProperties.Source, deploymentId)]);
1121
properties.Add(
new
("azure.deployment.operations.total", summary.Operations.Length));
1122
properties.Add(
new
("azure.deployment.operations.running", summary.RunningOperations.Length));
1123
properties.Add(
new
("azure.deployment.operations.succeeded", summary.SucceededOperations.Length));
1124
properties.Add(
new
("azure.deployment.operations.failed", summary.FailedOperations.Length));
1125
properties.Add(
new
("azure.deployment.operations.canceled", summary.CanceledOperations.Length));
1139
properties.Add(
new
(propertyName, labels));
1178
return
new
(DeploymentOperationSummaryPropertyName, value)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35
return [.. properties, new
ResourcePropertySnapshot
(name, value) { IsSensitive = isSensitive, DisplayName = displayName, IsHighlighted = isHighlighted, SortOrder = sortOrder }];
Aspire.Hosting.Azure.Tests (25)
AzureBicepProvisionerTests.cs (3)
1263
new
("azure.deployment.operations.total", 2),
1264
new
("azure.deployment.operations.succeeded", 1),
1265
new
("azure.deployment.operations.succeeded.resources", new[] { "old-search (Microsoft.Search/searchServices)" })
AzureEnvironmentResourceExtensionsTests.cs (22)
332
new
("azure.subscription.id", "sub")
345
new
("azure.subscription.id", "sub"),
346
new
(CustomResourceKnownProperties.Source, "deployment-id"),
347
new
("custom.property", "keep")
1115
new
("azure.provisioning.error.code", "LocationNotAvailableForResourceType"),
1116
new
("azure.provisioning.error.message", "old failure"),
1117
new
("azure.subscription.id", "12345678-1234-1234-1234-123456789012"),
1118
new
("custom.property", "kept")
1142
new
("azure.subscription.id", "12345678-1234-1234-1234-123456789012"),
1143
new
("custom.property", "kept")
2099
Properties = [
new
(CustomResourceKnownProperties.Source, "storage-deployment"),
new
("custom.property", "keep-storage")]
2106
Properties = [
new
(CustomResourceKnownProperties.Source, "storage2-deployment"),
new
("custom.property", "keep-storage2")]
3020
Properties = [
new
("azure.location", "westus2")]
3080
Properties = [
new
("azure.location", "westus2")]
3206
Properties = [
new
("azure.location", "westus2")]
3269
Properties = [
new
("azure.location", "westus2")]
3341
Properties = [
new
("azure.location", "westus2")]
3613
Properties = [
new
("azure.location", "westus2")]
3758
new
("azure.location", "westus3"),
3759
new
("azure.subscription.id", "12345678-1234-1234-1234-123456789012")
Aspire.Hosting.Blazor (3)
BlazorGatewayExtensions.cs (3)
139
new
(CustomResourceKnownProperties.Source, string.Empty)
200
new
(CustomResourceKnownProperties.Source, Path.GetFileName(projectPath))
224
new
(CustomResourceKnownProperties.Source, Path.GetFileName(resolvedPath))
Aspire.Hosting.Browsers (18)
BrowserLogsBuilderExtensions.cs (8)
298
new
(CustomResourceKnownProperties.Source, resourceName),
299
new
(BrowserPropertyName, configuration.Browser),
300
new
(UserDataModePropertyName, configuration.UserDataMode.ToString())
305
properties.Add(new
ResourcePropertySnapshot
(ProfilePropertyName, profile));
310
new
ResourcePropertySnapshot
(ActiveSessionCountPropertyName, 0),
311
new
ResourcePropertySnapshot
(ActiveSessionsPropertyName, "None"),
312
new
ResourcePropertySnapshot
(BrowserSessionsPropertyName, "[]"),
313
new
ResourcePropertySnapshot
(TotalSessionsLaunchedPropertyName, 0)
BrowserLogsSessionManager.cs (9)
440
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.ActiveSessionCountPropertyName, resourceState.ActiveSessions.Count);
441
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.ActiveSessionsPropertyName, FormatActiveSessions(resourceState.ActiveSessions.Values));
442
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.BrowserSessionsPropertyName, FormatBrowserSessions(resourceState.ActiveSessions.Values));
443
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.TotalSessionsLaunchedPropertyName, resourceState.TotalSessionsLaunched);
447
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.LastSessionPropertyName, resourceState.LastSessionId);
452
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.TargetUrlPropertyName, resourceState.LastTargetUrl);
457
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.BrowserExecutablePropertyName, resourceState.LastBrowserExecutable);
462
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.BrowserHostOwnershipPropertyName, resourceState.LastBrowserHostOwnership);
467
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.LastErrorPropertyName, resourceState.LastError);
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35
return [.. 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)
298
new
(CustomResourceKnownProperties.Source, resourceName),
299
new
(BrowserPropertyName, configuration.Browser),
300
new
(UserDataModePropertyName, configuration.UserDataMode.ToString())
305
properties.Add(new
ResourcePropertySnapshot
(ProfilePropertyName, profile));
310
new
ResourcePropertySnapshot
(ActiveSessionCountPropertyName, 0),
311
new
ResourcePropertySnapshot
(ActiveSessionsPropertyName, "None"),
312
new
ResourcePropertySnapshot
(BrowserSessionsPropertyName, "[]"),
313
new
ResourcePropertySnapshot
(TotalSessionsLaunchedPropertyName, 0)
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (9)
440
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.ActiveSessionCountPropertyName, resourceState.ActiveSessions.Count);
441
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.ActiveSessionsPropertyName, FormatActiveSessions(resourceState.ActiveSessions.Values));
442
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.BrowserSessionsPropertyName, FormatBrowserSessions(resourceState.ActiveSessions.Values));
443
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.TotalSessionsLaunchedPropertyName, resourceState.TotalSessionsLaunched);
447
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.LastSessionPropertyName, resourceState.LastSessionId);
452
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.TargetUrlPropertyName, resourceState.LastTargetUrl);
457
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.BrowserExecutablePropertyName, resourceState.LastBrowserExecutable);
462
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.BrowserHostOwnershipPropertyName, resourceState.LastBrowserHostOwnership);
467
yield return new
ResourcePropertySnapshot
(BrowserLogsBuilderExtensions.LastErrorPropertyName, resourceState.LastError);
src\Shared\CustomResourceSnapshotExtensions.cs (1)
35
return [.. properties, new
ResourcePropertySnapshot
(name, value) { IsSensitive = isSensitive, DisplayName = displayName, IsHighlighted = isHighlighted, SortOrder = sortOrder }];
Aspire.Hosting.DevTunnels (11)
DevTunnelResourceBuilderExtensions.cs (11)
111
new
("TunnelId", tunnelId)
707
new
(CustomResourceKnownProperties.Source, $"{targetResource.Name}/{targetEndpoint.EndpointName}"),
708
new
("TargetResource", targetResource.Name),
709
new
("TargetEndpoint", targetEndpoint.EndpointName),
710
new
("Protocol", portOptions.Protocol),
711
new
("Description", portOptions.Description),
712
new
("Labels", portOptions.Labels is null ? "" : $"{string.Join(", ", portOptions.Labels)}"),
810
ResourcePropertySnapshot[] policyProperties = effectivePolicy is null ? [] : [
new
("Anonymous access", effectivePolicy)];
890
new
(DevTunnelPortResource.TunnelUrlPropertyName, NormalizeUrl(portUri))
899
properties.Add(
new
(DevTunnelPortResource.InspectUrlPropertyName, inspectUrl)
908
properties.Add(
new
(DevTunnelPortResource.LocalEndpointUrlPropertyName, localUrl)
Aspire.Hosting.Foundry (6)
FoundryExtensions.cs (4)
372
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, "Foundry Local")]
380
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, "Foundry Local")]
412
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, model)]
450
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, $"{model} ({deployment.LocalModelId})")]
Toolbox\FoundryToolboxResource.cs (2)
385
new
("Toolbox version", result.Version),
386
new
(IsExisting ? "Validation action" : "Reconciliation action", result.Action.ToString())
Aspire.Hosting.MongoDB.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
60
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
79
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
Aspire.Hosting.MySql.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
60
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
79
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
Aspire.Hosting.OpenAI (4)
OpenAIExtensions.cs (4)
73
new
(CustomResourceKnownProperties.Source, "OpenAI")
87
Properties = [.. s.Properties,
new
(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
122
new
(CustomResourceKnownProperties.Source, "OpenAI Models")
133
Properties = [.. s.Properties,
new
(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.PostgreSQL.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
60
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
79
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
Aspire.Hosting.Redis.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
60
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
79
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
Aspire.Hosting.SqlServer.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
60
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
79
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
Aspire.Hosting.Tests (29)
Backchannel\AppHostBackchannelTests.cs (2)
82
Properties = [
new
("A", "B"),
new
("c", "d")],
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (11)
242
new
ResourcePropertySnapshot
(CustomResourceKnownProperties.Source, "normal-value"),
243
new
ResourcePropertySnapshot
("ConnectionString", "secret-value") { IsSensitive = true }
1261
new
ResourcePropertySnapshot
("number", 42),
1262
new
ResourcePropertySnapshot
("flag", true),
1263
new
ResourcePropertySnapshot
("list", new[] { "one", "two" }),
1264
new
ResourcePropertySnapshot
("ConnectionString", "secret-value") { IsSensitive = true }
1301
new
ResourcePropertySnapshot
("number", 42),
1302
new
ResourcePropertySnapshot
("flag", true),
1303
new
ResourcePropertySnapshot
("list", new[] { "one", "two" }),
1304
new
ResourcePropertySnapshot
("object", new KeyValuePair<string, string>[]
1309
new
ResourcePropertySnapshot
("ConnectionString", "secret-value") { IsSensitive = true }
Dashboard\ResourcePublisherTests.cs (1)
18
new
ResourcePropertySnapshot
(
ResourceNotificationTests.cs (15)
34
Properties = [
new
("A", "B")],
122
await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(
new
("A", "value")) }).DefaultTimeout();
124
await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(
new
("B", "value")) }).DefaultTimeout();
200
await notificationService.PublishUpdateAsync(resource1, state => state with { Properties = state.Properties.Add(
new
("A", "value")) }).DefaultTimeout();
202
await notificationService.PublishUpdateAsync(resource2, state => state with { Properties = state.Properties.Add(
new
("B", "value")) }).DefaultTimeout();
204
await notificationService.PublishUpdateAsync(resource1, "replica1", state => state with { Properties = state.Properties.Add(
new
("C", "value")) }).DefaultTimeout();
838
Properties = [new
ResourcePropertySnapshot
(KnownProperties.Resource.WaitingFor, new[] { "dependency" })]
868
Properties = [new
ResourcePropertySnapshot
(KnownProperties.Resource.WaitingFor, new[] { dependency.Name })]
1784
new
("Ports", ImmutableArray.Create(8080, 8081))
1791
new
("Args", new List<string> { "--verbose", "--port", "8080" }),
1792
new
("Tags", new[] { "a", "b" })
1827
new
("Ports", ImmutableArray.Create(8080, 8081)),
1828
new
("Args", new List<string> { "--verbose", "--port", "9090" }),
1829
new
("Tags", new[] { "a", "b" })
1890
new
ResourcePropertySnapshot
("property", new List<string> { "original" })
Aspire.Hosting.Valkey.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
60
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
79
Properties = containerId is null ? [] : [
new
("container.id", containerId)]
CustomResources.AppHost (5)
TalkingClockResource.cs (2)
50
new
(CustomResourceKnownProperties.Source, "Talking Clock")
137
new
(CustomResourceKnownProperties.Source, "Talking Clock")
TestResource.cs (3)
22
new
("P1", "P2"),
23
new
(CustomResourceKnownProperties.Source, "Custom")
56
Properties = [.. state.Properties,
new
("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
Stress.AppHost (15)
TestResource.cs (15)
23
new
("P1", "P2"),
24
new
(CustomResourceKnownProperties.Source, "Custom")
41
new
("P1", "P2"),
42
new
(CustomResourceKnownProperties.Source, "Custom"),
43
new
(KnownProperties.Resource.ParentName, parent.Name)
60
new
(KnownProperties.Resource.ParentName, parent.Name)
77
new
(KnownProperties.Resource.ParentName, parent.Name)
93
new
(CustomResourceKnownProperties.Source, "Custom")
110
new
(KnownProperties.Executable.Path, "/stress/known/path")
114
new
(KnownProperties.Executable.Args, "--api-key stress-secret-value")
119
new
("stress.property.highlighted", "Visible highlighted value")
124
new
("stress.property.highlightedSecret", "Visible highlighted sensitive value")
130
new
("stress.property.hidden", "Hidden until Show all is selected")
134
new
("stress.property.hiddenSecret", "Hidden sensitive value until Show all is selected")
170
Properties = [.. state.Properties,
new
("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
156 references to ResourcePropertySnapshot
Aspire.Hosting (27)
ApplicationModel\CustomResourceSnapshot.cs (5)
35
public required ImmutableArray<
ResourcePropertySnapshot
> Properties { get; init; }
207
private static bool PropertiesContentEqual(ImmutableArray<
ResourcePropertySnapshot
> x, ImmutableArray<
ResourcePropertySnapshot
> y)
225
private static bool ResourcePropertyContentEquals(
ResourcePropertySnapshot
x,
ResourcePropertySnapshot
y)
ApplicationModel\DotnetToolResource.cs (2)
43
internal IEnumerable<
ResourcePropertySnapshot
> CreateSnapshotProperties()
56
private static
ResourcePropertySnapshot
CreateHighlightedProperty(string name, object? value, string displayName, int sortOrder)
ApplicationModel\ParameterResource.cs (1)
94
internal
ResourcePropertySnapshot
CreateValueSnapshotProperty(string value)
ApplicationModel\ResourceNotificationService.cs (2)
1392
private static bool TryGetWaitingForDependencies(ImmutableArray<
ResourcePropertySnapshot
> properties, [NotNullWhen(true)] out string[]? dependencies)
1394
foreach (
var
property in properties)
ApplicationModel\TerminalResourceSnapshotProperties.cs (2)
35
public static ImmutableArray<
ResourcePropertySnapshot
> AddTerminalProperties(
38
ImmutableArray<
ResourcePropertySnapshot
> properties)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1174
foreach (
var
prop in stampedProperties)
Dashboard\GenericResourceSnapshot.cs (1)
15
foreach (
var
property in state.Properties)
Dashboard\ResourcePropertySnapshotMetadata.cs (1)
20
internal static
ResourcePropertySnapshot
Create(string resourceType, string name, object? value, bool isSensitive = false)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null)
15
var
property = properties[i];
38
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourcePropertyRange(this ImmutableArray<
ResourcePropertySnapshot
> properties, IEnumerable<
ResourcePropertySnapshot
> newValues)
40
var existingProperties = new List<
ResourcePropertySnapshot
>(properties);
41
var propertiesToAdd = new List<
ResourcePropertySnapshot
>();
43
foreach (
var
newValue in newValues)
48
var
existingProperty = existingProperties[i];
71
internal static ImmutableArray<
ResourcePropertySnapshot
> RemoveResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name)
Aspire.Hosting.Azure (46)
AzureEnvironmentResourceExtensions.cs (1)
46
Properties = ImmutableArray<
ResourcePropertySnapshot
>.Empty
AzureProvisioningController.cs (6)
1093
private static ImmutableArray<
ResourcePropertySnapshot
> CreateAzureEnvironmentFailureProperties(IReadOnlyList<(IResource Resource, IAzureResource AzureResource)> azureResources)
4116
private static ImmutableArray<
ResourcePropertySnapshot
> FilterProperties(ImmutableArray<
ResourcePropertySnapshot
> properties)
4154
ImmutableArray<
ResourcePropertySnapshot
> additionalProperties,
4163
? ImmutableArray<
ResourcePropertySnapshot
>.Empty
4191
private static ImmutableArray<
ResourcePropertySnapshot
> BuildAzureEnvironmentProperties(AzureContextState context)
AzureProvisioningFailureDetails.cs (6)
387
internal ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperties(ImmutableArray<
ResourcePropertySnapshot
> properties, string fallbackOperation)
389
var failureProperties = ImmutableArray.CreateBuilder<
ResourcePropertySnapshot
>();
450
internal static
ResourcePropertySnapshot
CreateHighlightedFailureProperty(string name, object value, string displayName)
795
internal static ImmutableArray<
ResourcePropertySnapshot
> WithoutAzureProvisioningFailureProperties(this ImmutableArray<
ResourcePropertySnapshot
> properties)
AzureResourceProperties.cs (14)
32
public static ImmutableArray<
ResourcePropertySnapshot
> CreateContextProperties(
40
var properties = ImmutableArray.CreateBuilder<
ResourcePropertySnapshot
>();
51
public static
ResourcePropertySnapshot
CreateSubscriptionId(string? value) =>
54
public static
ResourcePropertySnapshot
CreateResourceGroup(string? value) =>
57
public static
ResourcePropertySnapshot
CreateLocation(string? value) =>
60
public static
ResourcePropertySnapshot
CreateTenantId(string? value) =>
63
public static
ResourcePropertySnapshot
CreateTenantDomain(string? value) =>
66
public static ImmutableArray<
ResourcePropertySnapshot
> CreateActiveOperationProperties(
73
var properties = ImmutableArray.CreateBuilder<
ResourcePropertySnapshot
>();
83
public static ImmutableArray<
ResourcePropertySnapshot
> WithoutActiveOperationProperties(this ImmutableArray<
ResourcePropertySnapshot
> properties)
94
private static
ResourcePropertySnapshot
CreateHighlighted(string name, string? value, string displayName) =>
101
private static void Add(ImmutableArray<
ResourcePropertySnapshot
>.Builder properties, Func<string?,
ResourcePropertySnapshot
> createProperty, string? value, bool includeEmptyProperties)
Provisioning\Provisioners\BicepProvisioner.cs (7)
817
ImmutableArray<
ResourcePropertySnapshot
> properties = state.Properties.WithoutAzureProvisioningFailureProperties()
1112
private static ImmutableArray<
ResourcePropertySnapshot
> CreateDeploymentOperationProperties(AzureDeploymentOperationSummary summary)
1114
var properties = ImmutableArray.CreateBuilder<
ResourcePropertySnapshot
>();
1144
private static
ResourcePropertySnapshot
? CreateDeploymentOperationSummaryProperty(AzureDeploymentOperationSummary summary)
1176
static
ResourcePropertySnapshot
CreateSummaryProperty(string value)
1186
private static ImmutableArray<
ResourcePropertySnapshot
> WithoutDeploymentOperationProperties(ImmutableArray<
ResourcePropertySnapshot
> properties)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null)
15
var
property = properties[i];
38
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourcePropertyRange(this ImmutableArray<
ResourcePropertySnapshot
> properties, IEnumerable<
ResourcePropertySnapshot
> newValues)
40
var existingProperties = new List<
ResourcePropertySnapshot
>(properties);
41
var propertiesToAdd = new List<
ResourcePropertySnapshot
>();
43
foreach (
var
newValue in newValues)
48
var
existingProperty = existingProperties[i];
71
internal static ImmutableArray<
ResourcePropertySnapshot
> RemoveResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name)
Aspire.Hosting.Azure.Tests (13)
AzureBicepProvisionerTests.cs (6)
1227
static void AssertResourceProperty(
ResourcePropertySnapshot
property, string name, object value)
1233
static string[] AssertStringArrayProperty(
ResourcePropertySnapshot
property, string name)
1798
var
property = Assert.Single(resourceEvent.Snapshot.Properties, p => p.Name == "azure.resource.group");
1803
private static void AssertHighlightedContextProperty(IEnumerable<
ResourcePropertySnapshot
> properties, string name, object value, string displayName)
1805
var
property = Assert.Single(properties, p => p.Name == name);
1809
private static void AssertHighlightedResourceProperty(
ResourcePropertySnapshot
property, string name, object value, string displayName)
AzureEnvironmentResourceExtensionsTests.cs (7)
997
var
resourceNameProperty = properties.Single(property => property.Name == "azure.provisioning.error.resource.name");
1003
var
targetResourceIdProperty = properties.Single(property => property.Name == "azure.provisioning.error.target.resource.id");
1113
ImmutableArray<
ResourcePropertySnapshot
> properties =
1140
ImmutableArray<
ResourcePropertySnapshot
> properties =
4852
var
failedResourcesProperty = Assert.Single(environmentEvent.Snapshot.Properties, property => property.Name == "azure.provisioning.error.failed.resources");
5067
private static void AssertHighlightedContextProperty(IEnumerable<
ResourcePropertySnapshot
> properties, string name, object value, string displayName)
5069
var
property = Assert.Single(properties, p => p.Name == name);
Aspire.Hosting.Blazor.Tests (1)
AddBlazorGatewayTests.cs (1)
45
var
source = Assert.Single(
Aspire.Hosting.Browsers (24)
BrowserLogsBuilderExtensions.cs (2)
294
static ImmutableArray<
ResourcePropertySnapshot
> CreateInitialProperties(string resourceName, BrowserConfiguration configuration)
296
List<
ResourcePropertySnapshot
> properties =
BrowserLogsConfigurationManager.cs (4)
427
private static System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> SetConfigurationProperties(
428
System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> properties,
440
private static System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> RemoveProperty(
441
System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> properties,
BrowserLogsSessionManager.cs (6)
438
private static IEnumerable<
ResourcePropertySnapshot
> GetPropertyUpdates(ResourceSessionState resourceState)
471
private static ImmutableArray<
ResourcePropertySnapshot
> UpdateProperties(
472
ImmutableArray<
ResourcePropertySnapshot
> properties,
474
IEnumerable<
ResourcePropertySnapshot
> propertyUpdates)
499
private static ImmutableArray<
ResourcePropertySnapshot
> RemoveProperty(ImmutableArray<
ResourcePropertySnapshot
> properties, string name)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null)
15
var
property = properties[i];
38
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourcePropertyRange(this ImmutableArray<
ResourcePropertySnapshot
> properties, IEnumerable<
ResourcePropertySnapshot
> newValues)
40
var existingProperties = new List<
ResourcePropertySnapshot
>(properties);
41
var propertiesToAdd = new List<
ResourcePropertySnapshot
>();
43
foreach (
var
newValue in newValues)
48
var
existingProperty = existingProperties[i];
71
internal static ImmutableArray<
ResourcePropertySnapshot
> RemoveResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name)
Aspire.Hosting.Browsers.Tests (25)
BrowserLogsBuilderExtensionsTests.cs (1)
1752
var
property = snapshot.Properties.Single(property => property.Name == BrowserLogsBuilderExtensions.BrowserSessionsPropertyName);
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (2)
294
static ImmutableArray<
ResourcePropertySnapshot
> CreateInitialProperties(string resourceName, BrowserConfiguration configuration)
296
List<
ResourcePropertySnapshot
> properties =
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (4)
427
private static System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> SetConfigurationProperties(
428
System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> properties,
440
private static System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> RemoveProperty(
441
System.Collections.Immutable.ImmutableArray<
ResourcePropertySnapshot
> properties,
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (6)
438
private static IEnumerable<
ResourcePropertySnapshot
> GetPropertyUpdates(ResourceSessionState resourceState)
471
private static ImmutableArray<
ResourcePropertySnapshot
> UpdateProperties(
472
ImmutableArray<
ResourcePropertySnapshot
> properties,
474
IEnumerable<
ResourcePropertySnapshot
> propertyUpdates)
499
private static ImmutableArray<
ResourcePropertySnapshot
> RemoveProperty(ImmutableArray<
ResourcePropertySnapshot
> properties, string name)
src\Shared\CustomResourceSnapshotExtensions.cs (12)
11
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name, object value, bool isSensitive = false, string? displayName = null, bool isHighlighted = false, int? sortOrder = null)
15
var
property = properties[i];
38
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourcePropertyRange(this ImmutableArray<
ResourcePropertySnapshot
> properties, IEnumerable<
ResourcePropertySnapshot
> newValues)
40
var existingProperties = new List<
ResourcePropertySnapshot
>(properties);
41
var propertiesToAdd = new List<
ResourcePropertySnapshot
>();
43
foreach (
var
newValue in newValues)
48
var
existingProperty = existingProperties[i];
71
internal static ImmutableArray<
ResourcePropertySnapshot
> RemoveResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name)
Aspire.Hosting.DevTunnels (3)
DevTunnelResourceBuilderExtensions.cs (3)
810
ResourcePropertySnapshot
[] policyProperties = effectivePolicy is null ? [] : [new("Anonymous access", effectivePolicy)];
881
private static List<
ResourcePropertySnapshot
> GetUrlProperties(DevTunnelPortResource portResource)
888
List<
ResourcePropertySnapshot
> properties =
Aspire.Hosting.Tests (17)
Dashboard\ResourcePublisherTests.cs (1)
202
private static GenericResourceSnapshot CreateResourceSnapshot(string name, params
ResourcePropertySnapshot
[] properties)
Dcp\DcpExecutorTests.cs (2)
11593
private static
ResourcePropertySnapshot
GetProperty(CustomResourceSnapshot snapshot, string name)
11600
var
property = GetProperty(snapshot, name);
Dcp\ResourceSnapshotBuilderTests.cs (4)
302
private static
ResourcePropertySnapshot
GetProperty(CustomResourceSnapshot snapshot, string name)
309
var
property = GetProperty(snapshot, name);
318
var
property = GetProperty(snapshot, name);
327
var
property = GetProperty(snapshot, name);
DotnetToolResourceTests.cs (2)
28
var
sourceProperty = properties[KnownProperties.Resource.Source];
56
private static void AssertToolProperty(
ResourcePropertySnapshot
property, string expectedValue, string expectedDisplayName, int expectedSortOrder)
Orchestrator\ParameterProcessorTests.cs (1)
1334
var
property = Assert.Single(snapshot.Properties, p => p.Name == KnownProperties.Parameter.Value);
ResourceNotificationTests.cs (7)
1882
var property = GetContentProperty(typeof(
ResourcePropertySnapshot
), propertyName);
1907
$"Changing {nameof(
ResourcePropertySnapshot
)}.{propertyName} should publish a new snapshot.");
1912
var
property = resourceEvent.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.WaitingFor);
1920
CreatePropertyTheoryData(typeof(
ResourcePropertySnapshot
));
1979
private static
ResourcePropertySnapshot
MutateProperty(
ResourcePropertySnapshot
snapshot, PropertyInfo property)
1983
var
mutated = snapshot with { };