53 instantiations of ResourcePropertySnapshot
Aspire.Hosting (24)
Dcp\ResourceSnapshotBuilder.cs (21)
47
new
(KnownProperties.Container.Image, container.Spec.Image),
48
new
(KnownProperties.Container.Id, containerId),
49
new
(KnownProperties.Container.Command, container.Spec.Command),
50
new
(KnownProperties.Container.Args, container.Status?.EffectiveArgs ?? []) { IsSensitive = true },
51
new
(KnownProperties.Container.Ports, GetPorts()),
52
new
(KnownProperties.Container.Lifetime, GetContainerLifetime()),
53
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
54
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
122
new
(KnownProperties.Executable.Path, executable.Spec.ExecutablePath),
123
new
(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
124
new
(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true },
125
new
(KnownProperties.Executable.Pid, executable.Status?.ProcessId),
126
new
(KnownProperties.Project.Path, projectPath),
127
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
128
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
145
new
(KnownProperties.Executable.Path, executable.Spec.ExecutablePath),
146
new
(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
147
new
(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true },
148
new
(KnownProperties.Executable.Pid, executable.Status?.ProcessId),
149
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
150
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
ParameterResourceBuilderExtensions.cs (2)
167
new
("parameter.secret", resource.Secret.ToString()),
168
new
(CustomResourceKnownProperties.Source, resource.ConfigurationKey)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
31
return [.. properties, new
ResourcePropertySnapshot
(name, value) { IsSensitive = IsSensitive }];
Aspire.Hosting.Azure (10)
Provisioning\Provisioners\BicepProvisioner.cs (9)
95
new
("azure.subscription.id", configuration["Azure:SubscriptionId"]),
97
new
("azure.tenant.domain", configuration["Azure:Tenant"]),
98
new
("azure.location", configuration["Azure:Location"]),
99
new
(CustomResourceKnownProperties.Source, section["Id"])
137
new
("azure.subscription.id", context.Subscription.Id.Name),
138
new
("azure.resource.group", resourceGroup.Id.Name),
139
new
("azure.tenant.domain", context.Tenant.Data.DefaultDomain),
140
new
("azure.location", context.Location.ToString()),
297
new
(CustomResourceKnownProperties.Source, deployment.Id.Name)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
31
return [.. properties, new
ResourcePropertySnapshot
(name, value) { IsSensitive = IsSensitive }];
Aspire.Hosting.Tests (8)
Backchannel\AppHostBackchannelTests.cs (2)
99
Properties = [
new
("A", "B"),
new
("c", "d")],
ResourceNotificationTests.cs (6)
26
Properties = [
new
("A", "B")],
71
await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(
new
("A", "value")) }).DefaultTimeout();
73
await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(
new
("B", "value")) }).DefaultTimeout();
124
await notificationService.PublishUpdateAsync(resource1, state => state with { Properties = state.Properties.Add(
new
("A", "value")) }).DefaultTimeout();
126
await notificationService.PublishUpdateAsync(resource2, state => state with { Properties = state.Properties.Add(
new
("B", "value")) }).DefaultTimeout();
128
await notificationService.PublishUpdateAsync(resource1, "replica1", state => state with { Properties = state.Properties.Add(
new
("C", "value")) }).DefaultTimeout();
CustomResources.AppHost (5)
TalkingClockResource.cs (2)
117
new
(CustomResourceKnownProperties.Source, "Talking Clock")
137
new
(CustomResourceKnownProperties.Source, "Talking Clock")
TestResource.cs (3)
20
new
("P1", "P2"),
21
new
(CustomResourceKnownProperties.Source, "Custom")
51
Properties = [.. state.Properties,
new
("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
Stress.AppHost (6)
TestResource.cs (6)
21
new
("P1", "P2"),
22
new
(CustomResourceKnownProperties.Source, "Custom")
38
new
("P1", "P2"),
39
new
(CustomResourceKnownProperties.Source, "Custom"),
40
new
(KnownProperties.Resource.ParentName, parent.Name)
69
Properties = [.. state.Properties,
new
("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
23 references to ResourcePropertySnapshot
Aspire.Hosting (11)
ApplicationModel\CustomResourceSnapshot.cs (1)
34
public required ImmutableArray<
ResourcePropertySnapshot
> Properties { get; init; }
src\Shared\CustomResourceSnapshotExtensions.cs (10)
11
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name, object value, bool IsSensitive = false)
15
var
property = properties[i];
34
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourcePropertyRange(this ImmutableArray<
ResourcePropertySnapshot
> properties, IEnumerable<
ResourcePropertySnapshot
> newValues)
36
var existingProperties = new List<
ResourcePropertySnapshot
>(properties);
37
var propertiesToAdd = new List<
ResourcePropertySnapshot
>();
39
foreach (
var
newValue in newValues)
44
var
existingProperty = existingProperties[i];
Aspire.Hosting.Azure (12)
Provisioning\Provisioners\BicepProvisioner.cs (2)
93
ImmutableArray<
ResourcePropertySnapshot
> props = [
295
ImmutableArray<
ResourcePropertySnapshot
> properties = [
src\Shared\CustomResourceSnapshotExtensions.cs (10)
11
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourceProperty(this ImmutableArray<
ResourcePropertySnapshot
> properties, string name, object value, bool IsSensitive = false)
15
var
property = properties[i];
34
internal static ImmutableArray<
ResourcePropertySnapshot
> SetResourcePropertyRange(this ImmutableArray<
ResourcePropertySnapshot
> properties, IEnumerable<
ResourcePropertySnapshot
> newValues)
36
var existingProperties = new List<
ResourcePropertySnapshot
>(properties);
37
var propertiesToAdd = new List<
ResourcePropertySnapshot
>();
39
foreach (
var
newValue in newValues)
44
var
existingProperty = existingProperties[i];