50 writes to Properties
Aspire.Hosting (16)
ApplicationModel\ResourceNotificationService.cs (1)
802Properties = [],
ConnectionStringBuilderExtensions.cs (1)
85Properties = []
Dashboard\DashboardLifecycleHook.cs (1)
213Properties = [],
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)
71Properties = [.. state.Properties, new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }] 169Properties = s.Properties.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""), 427Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
72Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, value, parameterResource.Secret), 110Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, ex.Message) 192Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, inputValue, parameter.Secret),
ParameterResourceBuilderExtensions.cs (1)
218Properties = [
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\BicepProvisioner.cs (3)
95Properties = props 121Properties = state.Properties.SetResourcePropertyRange([ 292Properties = 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)] 284Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, $"{model} ({progress.ModelInfo.ModelId})")]
Aspire.Hosting.GitHub.Models (2)
GitHubModelsExtensions.cs (2)
51Properties = 67Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.OpenAI (4)
OpenAIExtensions.cs (4)
59Properties = 75Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }] 106Properties = 119Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }]
Aspire.Hosting.Tests (12)
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)
131Properties = [new("A", "B"), new("c", "d")],
Dashboard\ResourcePublisherTests.cs (1)
186Properties = [],
ResourceCommandAnnotationTests.cs (1)
59Properties = [],
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)
19Properties = [ 51Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
HealthChecksSandbox.AppHost (1)
Program.cs (1)
55Properties = [],
Stress.AppHost (4)
Program.cs (1)
34Properties = [],
TestResource.cs (3)
20Properties = [ 37Properties = [ 69Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
61 references to Properties
Aspire.Hosting (14)
ApplicationModel\ResourceNotificationService.cs (1)
652string.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)
71Properties = [.. state.Properties, new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }] 169Properties = s.Properties.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""), 427Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
72Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, value, parameterResource.Secret), 110Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, ex.Message) 192Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, inputValue, parameter.Secret),
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\BicepProvisioner.cs (3)
83.. state.Properties, 121Properties = state.Properties.SetResourcePropertyRange([ 284.. 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)] 284Properties = [.. state.Properties, new(CustomResourceKnownProperties.Source, $"{model} ({progress.ModelInfo.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.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
67Properties = [.. 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)
75Properties = [.. s.Properties, new(CustomResourceKnownProperties.ConnectionString, cs) { IsSensitive = true }] 119Properties = [.. 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 (30)
AddParameterTests.cs (1)
35Assert.Collection(state.Properties,
DistributedApplicationTests.cs (6)
181Assert.Contains("TestProject.ServiceA.csproj", notStartedResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString()); 182Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString()); 268Assert.Equal(RedisImageSource, notStartedResourceEvent.Snapshot.Properties.Single(p => p.Name == "container.image").Value?.ToString()); 269Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString()); 349Assert.Equal(RedisImageSource, notStartedResourceEvent.Snapshot.Properties.Single(p => p.Name == "container.image").Value?.ToString()); 350Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.Properties.Single(p => p.Name == "project.path").Value?.ToString());
Orchestrator\ApplicationOrchestratorTests.cs (8)
47childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 94childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 193childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 197nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 201child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 261childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 308projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 419var connectionStringProp = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ConnectionString);
Orchestrator\ParameterProcessorTests.cs (4)
251Assert.Equal("value1", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 255Assert.Equal("value2", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 259Assert.Equal("secretValue", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 260Assert.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)
51Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
Stress.AppHost (1)
TestResource.cs (1)
69Properties = [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]