55 references to KnownProperties
Aspire.Hosting (43)
ApplicationModel\CustomResourceKnownProperties.cs (2)
16
public static string Source { get; } =
KnownProperties
.Resource.Source;
21
public static string ConnectionString { get; } =
KnownProperties
.Resource.ConnectionString;
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)
169
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""),
427
Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(
KnownProperties
.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
72
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Parameter.Value, value, parameterResource.Secret),
110
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Parameter.Value, ex.Message)
192
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Parameter.Value, inputValue, parameter.Secret),
Aspire.Hosting.Tests (12)
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();
193
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
197
nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
201
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
261
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
308
projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
419
var connectionStringProp = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ConnectionString);
Orchestrator\ParameterProcessorTests.cs (4)
251
Assert.Equal("value1", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.Value);
255
Assert.Equal("value2", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.Value);
259
Assert.Equal("secretValue", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.Value);
260
Assert.True(updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name ==
KnownProperties
.Parameter.Value)?.IsSensitive ?? false);