61 references to KnownProperties
Aspire.Hosting (44)
ApplicationModel\CustomResourceKnownProperties.cs (2)
16
public static string Source { get; } =
KnownProperties
.Resource.Source;
21
public static string ConnectionString { get; } =
KnownProperties
.Resource.ConnectionString;
ApplicationModel\ResourceNotificationService.cs (1)
613
Properties = newState.Properties.SetResourceProperty(
KnownProperties
.Resource.ExcludeFromMcp, true)
Dashboard\ResourceSnapshot.cs (10)
42
yield return (
KnownProperties
.Resource.Uid, Value.ForString(Uid), IsSensitive: false);
43
yield return (
KnownProperties
.Resource.Name, Value.ForString(Name), IsSensitive: false);
44
yield return (
KnownProperties
.Resource.Type, Value.ForString(ResourceType), IsSensitive: false);
45
yield return (
KnownProperties
.Resource.DisplayName, Value.ForString(DisplayName), IsSensitive: false);
46
yield return (
KnownProperties
.Resource.State, State is null ? Value.ForNull() : Value.ForString(State), IsSensitive: false);
47
yield return (
KnownProperties
.Resource.ExitCode, ExitCode is null ? Value.ForNull() : Value.ForString(ExitCode.Value.ToString("D", CultureInfo.InvariantCulture)), IsSensitive: false);
48
yield return (
KnownProperties
.Resource.CreateTime, CreationTimeStamp is null ? Value.ForNull() : Value.ForString(CreationTimeStamp.Value.ToString("O")), IsSensitive: false);
49
yield return (
KnownProperties
.Resource.StartTime, StartTimeStamp is null ? Value.ForNull() : Value.ForString(StartTimeStamp.Value.ToString("O")), IsSensitive: false);
50
yield return (
KnownProperties
.Resource.StopTime, StopTimeStamp is null ? Value.ForNull() : Value.ForString(StopTimeStamp.Value.ToString("O")), IsSensitive: false);
51
yield return (
KnownProperties
.Resource.HealthState, CustomResourceSnapshot.ComputeHealthStatus(HealthReports, State) is not { } healthStatus ? Value.ForNull() : Value.ForString(healthStatus.ToString()), IsSensitive: false);
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 (2)
181
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""),
549
Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(
KnownProperties
.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
178
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Parameter.Value, value, parameterResource.Secret),
216
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Parameter.Value, ex.Message)
336
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Parameter.Value, inputValue, parameter.Secret),
Aspire.Hosting.Tests (17)
Orchestrator\ApplicationOrchestratorTests.cs (13)
54
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
101
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
200
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
204
nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
208
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
268
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
315
projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
426
var connectionStringProp = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ConnectionString);
703
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
707
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
759
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
763
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
812
childProjectParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
Orchestrator\ParameterProcessorTests.cs (4)
253
Assert.Equal("value1", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.Value);
257
Assert.Equal("value2", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.Value);
261
Assert.Equal("secretValue", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.Value);
262
Assert.True(updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.IsSensitive ?? false);