72 instantiations of ResourcePropertySnapshot
Aspire.Hosting (29)
Dcp\ResourceSnapshotBuilder.cs (26)
52
new
(KnownProperties.Container.Image, container.Spec.Image),
53
new
(KnownProperties.Container.Id, containerId),
54
new
(KnownProperties.Container.Command, container.Spec.Command),
55
new
(KnownProperties.Container.Args, container.Status?.EffectiveArgs ?? []) { IsSensitive = true },
56
new
(KnownProperties.Container.Ports, GetPorts()),
57
new
(KnownProperties.Container.Lifetime, GetContainerLifetime()),
58
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
59
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
115
new
(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
116
new
(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true },
117
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
118
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
166
new
(KnownProperties.Executable.Path, executable.Spec.ExecutablePath),
167
new
(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
168
new
(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true },
169
new
(KnownProperties.Executable.Pid, executable.Status?.ProcessId),
170
new
(KnownProperties.Project.Path, projectPath),
171
new
(KnownProperties.Project.LaunchProfile, launchProfileName),
172
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
173
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
190
new
(KnownProperties.Executable.Path, executable.Spec.ExecutablePath),
191
new
(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
192
new
(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true },
193
new
(KnownProperties.Executable.Pid, executable.Status?.ProcessId),
194
new
(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
195
new
(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
Orchestrator\ApplicationOrchestrator.cs (1)
71
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }]
ParameterResourceBuilderExtensions.cs (1)
219
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)
84
new
("azure.subscription.id", configuration["Azure:SubscriptionId"]),
86
new
("azure.tenant.domain", configuration["Azure:Tenant"]),
87
new
("azure.location", configuration["Azure:Location"]),
88
new
(CustomResourceKnownProperties.Source, section["Id"])
122
new
("azure.subscription.id", context.Subscription.Id.Name),
123
new
("azure.resource.group", resourceGroup.Id.Name),
124
new
("azure.tenant.domain", context.Tenant.DefaultDomain),
125
new
("azure.location", context.Location.ToString()),
285
new
(CustomResourceKnownProperties.Source, deployment.Id.Name)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
31
return [.. properties, new
ResourcePropertySnapshot
(name, value) { IsSensitive = IsSensitive }];
Aspire.Hosting.Azure.AIFoundry (4)
AzureAIFoundryExtensions.cs (4)
228
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, "Foundry Local")]
236
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, "Foundry Local")]
266
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, model)]
284
Properties = [.. state.Properties,
new
(CustomResourceKnownProperties.Source, $"{model} ({progress.ModelInfo.ModelId})")]
Aspire.Hosting.GitHub.Models (2)
GitHubModelsExtensions.cs (2)
53
new
(CustomResourceKnownProperties.Source, "GitHub Models")
67
Properties = [.. s.Properties,
new
(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.OpenAI (4)
OpenAIExtensions.cs (4)
61
new
(CustomResourceKnownProperties.Source, "OpenAI")
75
Properties = [.. s.Properties,
new
(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
108
new
(CustomResourceKnownProperties.Source, "OpenAI Models")
119
Properties = [.. s.Properties,
new
(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.Tests (12)
Backchannel\AppHostBackchannelTests.cs (2)
63
Properties = [
new
("A", "B"),
new
("c", "d")],
Backchannel\Exec\ContainerResourceExecTests.cs (2)
72
Properties = [
new
("A", "B"),
new
("c", "d")],
Backchannel\Exec\ProjectResourceExecTests.cs (2)
131
Properties = [
new
("A", "B"),
new
("c", "d")],
ResourceNotificationTests.cs (6)
25
Properties = [
new
("A", "B")],
70
await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(
new
("A", "value")) }).DefaultTimeout();
72
await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(
new
("B", "value")) }).DefaultTimeout();
123
await notificationService.PublishUpdateAsync(resource1, state => state with { Properties = state.Properties.Add(
new
("A", "value")) }).DefaultTimeout();
125
await notificationService.PublishUpdateAsync(resource2, state => state with { Properties = state.Properties.Add(
new
("B", "value")) }).DefaultTimeout();
127
await notificationService.PublishUpdateAsync(resource1, "replica1", state => state with { Properties = state.Properties.Add(
new
("C", "value")) }).DefaultTimeout();
CustomResources.AppHost (5)
TalkingClockResource.cs (2)
49
new
(CustomResourceKnownProperties.Source, "Talking Clock")
136
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))]
24 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)
82
ImmutableArray<
ResourcePropertySnapshot
> props = [
283
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];
Aspire.Hosting.Tests (1)
Orchestrator\ApplicationOrchestratorTests.cs (1)
419
var
connectionStringProp = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ConnectionString);