38 writes to Properties
Aspire.Hosting (12)
ApplicationModel\ResourceNotificationService.cs (1)
711
Properties
= [],
ConnectionStringBuilderExtensions.cs (1)
48
Properties
= []
Dashboard\DashboardLifecycleHook.cs (1)
168
Properties
= [],
Dcp\ResourceSnapshotBuilder.cs (3)
51
Properties
= previous.Properties.SetResourcePropertyRange([
126
Properties
= previous.Properties.SetResourcePropertyRange([
149
Properties
= previous.Properties.SetResourcePropertyRange([
Orchestrator\ApplicationOrchestrator.cs (5)
69
Properties
= [.. state.Properties, new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }]
167
Properties
= s.Properties.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""),
288
Properties
= s.Properties.SetResourceProperty("Value", value ?? "", resourceWithoutLifetime is ParameterResource p && p.Secret)
300
Properties
= s.Properties.SetResourceProperty("Value", ex.Message)
426
Properties
= parent is null ? s.Properties : s.Properties.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
ParameterResourceBuilderExtensions.cs (1)
166
Properties
= [
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\BicepProvisioner.cs (3)
94
Properties
= props
119
Properties
= state.Properties.SetResourcePropertyRange([
271
Properties
= properties
Aspire.Hosting.Azure.AIFoundry (4)
AzureAIFoundryExtensions.cs (4)
166
Properties
= [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")]
174
Properties
= [.. state.Properties, new(CustomResourceKnownProperties.Source, "Foundry Local")]
207
Properties
= [.. state.Properties, new(CustomResourceKnownProperties.Source, model)]
225
Properties
= [.. state.Properties, new(CustomResourceKnownProperties.Source, $"{model} ({progress.ModelInfo.ModelId})")]
Aspire.Hosting.Tests (10)
Backchannel\AppHostBackchannelTests.cs (1)
99
Properties
= [new("A", "B"), new("c", "d")],
Dashboard\ResourcePublisherTests.cs (1)
187
Properties
= [],
ResourceCommandAnnotationTests.cs (1)
60
Properties
= [],
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();
WithUrlsTests.cs (1)
415
Properties
= []
CustomResources.AppHost (4)
TalkingClockResource.cs (2)
114
Properties
=
135
Properties
=
TestResource.cs (2)
19
Properties
= [
51
Properties
= [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
HealthChecksSandbox.AppHost (1)
Program.cs (1)
55
Properties
= [],
Stress.AppHost (4)
Program.cs (1)
34
Properties
= [],
TestResource.cs (3)
20
Properties
= [
37
Properties
= [
69
Properties
= [.. state.Properties, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
51 references to Properties
Aspire.Hosting (11)
ApplicationModel\ResourceNotificationService.cs (1)
591
string.Join(" ", newState.
Properties
.Select(p => $"{p.Name} = {Stringify(p.Value)}")),
Dashboard\GenericResourceSnapshot.cs (1)
15
foreach (var (key, value, isSensitive) in state.
Properties
)
Dcp\ResourceSnapshotBuilder.cs (3)
51
Properties = previous.
Properties
.SetResourcePropertyRange([
126
Properties = previous.
Properties
.SetResourcePropertyRange([
149
Properties = previous.
Properties
.SetResourcePropertyRange([
Orchestrator\ApplicationOrchestrator.cs (6)
69
Properties = [.. state.
Properties
, new(CustomResourceKnownProperties.ConnectionString, connectionString) { IsSensitive = true }]
167
Properties = s.
Properties
.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""),
288
Properties = s.
Properties
.SetResourceProperty("Value", value ?? "", resourceWithoutLifetime is ParameterResource p && p.Secret)
300
Properties = s.
Properties
.SetResourceProperty("Value", ex.Message)
426
Properties = parent is null ? s.
Properties
: s.
Properties
.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\BicepProvisioner.cs (3)
82
.. state.
Properties
,
119
Properties = state.
Properties
.SetResourcePropertyRange([
263
.. state.
Properties
,
Aspire.Hosting.Azure.AIFoundry (4)
AzureAIFoundryExtensions.cs (4)
166
Properties = [.. state.
Properties
, new(CustomResourceKnownProperties.Source, "Foundry Local")]
174
Properties = [.. state.
Properties
, new(CustomResourceKnownProperties.Source, "Foundry Local")]
207
Properties = [.. state.
Properties
, new(CustomResourceKnownProperties.Source, model)]
225
Properties = [.. state.
Properties
, new(CustomResourceKnownProperties.Source, $"{model} ({progress.ModelInfo.ModelId})")]
Aspire.Hosting.Azure.Tests (1)
AzureBicepProvisionerTests.cs (1)
68
var parentProperty = resourceEvent.Snapshot.
Properties
.FirstOrDefault(x => x.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
Aspire.Hosting.MySql.Tests (2)
MySqlFunctionalTests.cs (2)
600
return evt.Snapshot.
Properties
.FirstOrDefault(x => x.Name == "container.id")?.Value != null;
603
return resourceEvent.Snapshot.
Properties
.FirstOrDefault(x => x.Name == "container.id")?.Value?.ToString();
Aspire.Hosting.PostgreSQL.Tests (2)
PostgresFunctionalTests.cs (2)
581
return evt.Snapshot.
Properties
.FirstOrDefault(x => x.Name == "container.id")?.Value != null;
584
return resourceEvent.Snapshot.
Properties
.FirstOrDefault(x => x.Name == "container.id")?.Value?.ToString();
Aspire.Hosting.Tests (26)
AddParameterTests.cs (1)
35
Assert.Collection(state.
Properties
,
DistributedApplicationTests.cs (6)
182
Assert.Contains("TestProject.ServiceA.csproj", notStartedResourceEvent.Snapshot.
Properties
.Single(p => p.Name == "project.path").Value?.ToString());
183
Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.
Properties
.Single(p => p.Name == "project.path").Value?.ToString());
269
Assert.Equal(RedisImageSource, notStartedResourceEvent.Snapshot.
Properties
.Single(p => p.Name == "container.image").Value?.ToString());
270
Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.
Properties
.Single(p => p.Name == "project.path").Value?.ToString());
350
Assert.Equal(RedisImageSource, notStartedResourceEvent.Snapshot.
Properties
.Single(p => p.Name == "container.image").Value?.ToString());
351
Assert.Contains("TestProject.ServiceB.csproj", dependentResourceEvent.Snapshot.
Properties
.Single(p => p.Name == "project.path").Value?.ToString());
Orchestrator\ApplicationOrchestratorTests.cs (8)
47
childParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
94
childParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
186
childParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
190
nestedChildParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
194
child2ParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
254
childParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
301
projectBParentResourceId = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
412
var connectionStringProp = item.Snapshot.
Properties
.SingleOrDefault(p => p.Name == KnownProperties.Resource.ConnectionString);
ResourceNotificationTests.cs (11)
37
Assert.Collection(state.
Properties
, c =>
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();
83
Assert.Equal("value", c.Snapshot.
Properties
.Single(p => p.Name == "A").Value);
91
Assert.Equal("value", c.Snapshot.
Properties
.Single(p => p.Name == "B").Value);
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();
138
Assert.Equal("value", c.Snapshot.
Properties
.Single(p => p.Name == "A").Value);
145
Assert.Equal("value", c.Snapshot.
Properties
.Single(p => p.Name == "B").Value);
152
Assert.Equal("value", c.Snapshot.
Properties
.Single(p => p.Name == "C").Value);
CustomResources.AppHost (1)
TestResource.cs (1)
51
Properties = [.. state.
Properties
, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]
Stress.AppHost (1)
TestResource.cs (1)
69
Properties = [.. state.
Properties
, new("Interval", seconds.ToString(CultureInfo.InvariantCulture))]