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