54 writes to Properties
Aspire.Hosting (16)
ApplicationModel\ResourceNotificationService.cs (1)
807Properties = [],
ConnectionStringBuilderExtensions.cs (1)
85Properties = []
Dashboard\DashboardEventHandlers.cs (1)
448Properties = [],
Dcp\ResourceSnapshotBuilder.cs (4)
51Properties = previous.Properties.SetResourcePropertyRange([ 114Properties = previous.Properties.SetResourcePropertyRange([ 165Properties = previous.Properties.SetResourcePropertyRange([ 189Properties = previous.Properties.SetResourcePropertyRange([
ExternalServiceBuilderExtensions.cs (2)
86Properties = [] 148Properties = snapshot.Properties.SetResourceProperty(CustomResourceKnownProperties.Source, uri.Host),
Orchestrator\ApplicationOrchestrator.cs (3)
77Properties = [.. state.Properties, new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }] 175Properties = s.Properties.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""), 460Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
182Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, value, parameterResource.Secret), 220Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, ex.Message) 330Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, inputValue, parameter.Secret),
ParameterResourceBuilderExtensions.cs (1)
224Properties = [
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\BicepProvisioner.cs (3)
96Properties = props 122Properties = state.Properties.SetResourcePropertyRange([ 284Properties = properties
Aspire.Hosting.Azure.AIFoundry (4)
AzureAIFoundryExtensions.cs (4)
228Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")] 236Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")] 266Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, model)] 287Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, $"{model} ({deployment.ModelId})")]
Aspire.Hosting.DevTunnels (3)
DevTunnelResourceBuilderExtensions.cs (3)
109Properties = [ 565Properties = 644Properties = [
Aspire.Hosting.GitHub.Models (2)
GitHubModelsExtensions.cs (2)
57Properties = 73Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.OpenAI (4)
OpenAIExtensions.cs (4)
69Properties = 85Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }] 116Properties = 129Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.Tests (13)
Backchannel\AppHostBackchannelTests.cs (1)
63Properties = [new("A", "B"), new("c", "d")],
Backchannel\Exec\ContainerResourceExecTests.cs (1)
72Properties = [new("A", "B"), new("c", "d")],
Backchannel\Exec\ProjectResourceExecTests.cs (1)
133Properties = [new("A", "B"), new("c", "d")],
Dashboard\ResourcePublisherTests.cs (1)
186Properties = [],
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
299Properties = []
ResourceCommandAnnotationTests.cs (1)
58Properties = [],
ResourceNotificationTests.cs (6)
25Properties = [new("A", "B")], 70await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(new("A", "value")) }).DefaultTimeout(); 72await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(new("B", "value")) }).DefaultTimeout(); 123await notificationService.PublishUpdateAsync(resource1, state => state with { Properties = state.Properties.Add(new("A", "value")) }).DefaultTimeout(); 125await notificationService.PublishUpdateAsync(resource2, state => state with { Properties = state.Properties.Add(new("B", "value")) }).DefaultTimeout(); 127await notificationService.PublishUpdateAsync(resource1, "replica1", state => state with { Properties = state.Properties.Add(new("C", "value")) }).DefaultTimeout();
WithUrlsTests.cs (1)
453Properties = []
CustomResources.AppHost (4)
TalkingClockResource.cs (2)
46Properties = 134Properties =
TestResource.cs (2)
20Properties = [ 55Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
HealthChecksSandbox.AppHost (1)
Program.cs (1)
56Properties = [],
Stress.AppHost (4)
Program.cs (1)
34Properties = [],
TestResource.cs (3)
21Properties = [ 38Properties = [ 73Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
67 references to Properties
Aspire.Hosting (14)
ApplicationModel\ResourceNotificationService.cs (1)
659string.Join(" ", newState.Properties.Select(p => $"{p.Name} = {Stringify(p.Value)}")),
Dashboard\GenericResourceSnapshot.cs (1)
15foreach (var (key, value, isSensitive) in state.Properties)
Dcp\ResourceSnapshotBuilder.cs (4)
51Properties = previous.Properties.SetResourcePropertyRange([ 114Properties = previous.Properties.SetResourcePropertyRange([ 165Properties = previous.Properties.SetResourcePropertyRange([ 189Properties = previous.Properties.SetResourcePropertyRange([
ExternalServiceBuilderExtensions.cs (1)
148Properties = snapshot.Properties.SetResourceProperty(CustomResourceKnownProperties.Source, uri.Host),
Orchestrator\ApplicationOrchestrator.cs (4)
77Properties = [.. state.Properties, new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }] 175Properties = s.Properties.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""), 460Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
182Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, value, parameterResource.Secret), 220Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, ex.Message) 330Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, inputValue, parameter.Secret),
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\BicepProvisioner.cs (3)
84.. state.Properties, 122Properties = state.Properties.SetResourcePropertyRange([ 276.. state.Properties,
Aspire.Hosting.Azure.AIFoundry (4)
AzureAIFoundryExtensions.cs (4)
228Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")] 236Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")] 266Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, model)] 287Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, $"{model} ({deployment.ModelId})")]
Aspire.Hosting.Azure.Tests (1)
AzureBicepProvisionerTests.cs (1)
68var parentProperty = resourceEvent.Snapshot.Properties.FirstOrDefault(x => x.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
645.. snapshot.Properties.Where(p => !string.Equals(p.Name, "Anonymous access", StringComparison.OrdinalIgnoreCase)),
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
73Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.MySql.Tests (2)
MySqlFunctionalTests.cs (2)
601return evt.Snapshot.Properties.FirstOrDefault(x => x.Name == "container.id")?.Value != null; 604return resourceEvent.Snapshot.Properties.FirstOrDefault(x => x.Name == "container.id")?.Value?.ToString();
Aspire.Hosting.OpenAI (2)
OpenAIExtensions.cs (2)
85Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }] 129Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.PostgreSQL.Tests (2)
PostgresFunctionalTests.cs (2)
580return evt.Snapshot.Properties.FirstOrDefault(x => x.Name == "container.id")?.Value != null; 583return resourceEvent.Snapshot.Properties.FirstOrDefault(x => x.Name == "container.id")?.Value?.ToString();
Aspire.Hosting.Tests (35)
AddParameterTests.cs (1)
35Assert.Collection(state.Properties,
DistributedApplicationTests.cs (6)
187Assert.Contains("TestProject.ServiceA.csproj", notStartedResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString()); 188Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString()); 274Assert.Equal(RedisImageSource, notStartedResourceEvent.Snapshot.Properties.Single(p => p.Name == "container.image").Value?.ToString()); 275Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString()); 355Assert.Equal(RedisImageSource, notStartedResourceEvent.Snapshot.Properties.Single(p => p.Name == "container.image").Value?.ToString()); 356Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString());
Orchestrator\ApplicationOrchestratorTests.cs (13)
49childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 96childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 195childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 199nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 203child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 263childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 310projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 421var connectionStringProp = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ConnectionString); 680childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 684child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 736childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 740child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 789childProjectParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
Orchestrator\ParameterProcessorTests.cs (4)
252Assert.Equal("value1", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 256Assert.Equal("value2", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 260Assert.Equal("secretValue", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 261Assert.True(updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.IsSensitive ?? false);
ResourceNotificationTests.cs (11)
36Assert.Collection(state.Properties, c => 70await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(new("A", "value")) }).DefaultTimeout(); 72await notificationService.PublishUpdateAsync(resource, state => state with { Properties = state.Properties.Add(new("B", "value")) }).DefaultTimeout(); 82Assert.Equal("value", c.Snapshot.Properties.Single(p => p.Name == "A").Value); 90Assert.Equal("value", c.Snapshot.Properties.Single(p => p.Name == "B").Value); 123await notificationService.PublishUpdateAsync(resource1, state => state with { Properties = state.Properties.Add(new("A", "value")) }).DefaultTimeout(); 125await notificationService.PublishUpdateAsync(resource2, state => state with { Properties = state.Properties.Add(new("B", "value")) }).DefaultTimeout(); 127await notificationService.PublishUpdateAsync(resource1, "replica1", state => state with { Properties = state.Properties.Add(new("C", "value")) }).DefaultTimeout(); 137Assert.Equal("value", c.Snapshot.Properties.Single(p => p.Name == "A").Value); 144Assert.Equal("value", c.Snapshot.Properties.Single(p => p.Name == "B").Value); 151Assert.Equal("value", c.Snapshot.Properties.Single(p => p.Name == "C").Value);
CustomResources.AppHost (1)
TestResource.cs (1)
55Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
Stress.AppHost (1)
TestResource.cs (1)
73Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]