50 references to KnownProperties
Aspire.Hosting (38)
ApplicationModel\CustomResourceKnownProperties.cs (2)
16public static string Source { get; } = KnownProperties.Resource.Source; 21public static string ConnectionString { get; } = KnownProperties.Resource.ConnectionString;
Dashboard\ResourceSnapshot.cs (10)
40yield return (KnownProperties.Resource.Uid, Value.ForString(Uid), IsSensitive: false); 41yield return (KnownProperties.Resource.Name, Value.ForString(Name), IsSensitive: false); 42yield return (KnownProperties.Resource.Type, Value.ForString(ResourceType), IsSensitive: false); 43yield return (KnownProperties.Resource.DisplayName, Value.ForString(DisplayName), IsSensitive: false); 44yield return (KnownProperties.Resource.State, State is null ? Value.ForNull() : Value.ForString(State), IsSensitive: false); 45yield return (KnownProperties.Resource.ExitCode, ExitCode is null ? Value.ForNull() : Value.ForString(ExitCode.Value.ToString("D", CultureInfo.InvariantCulture)), IsSensitive: false); 46yield return (KnownProperties.Resource.CreateTime, CreationTimeStamp is null ? Value.ForNull() : Value.ForString(CreationTimeStamp.Value.ToString("O")), IsSensitive: false); 47yield return (KnownProperties.Resource.StartTime, StartTimeStamp is null ? Value.ForNull() : Value.ForString(StartTimeStamp.Value.ToString("O")), IsSensitive: false); 48yield return (KnownProperties.Resource.StopTime, StopTimeStamp is null ? Value.ForNull() : Value.ForString(StopTimeStamp.Value.ToString("O")), IsSensitive: false); 49yield return (KnownProperties.Resource.HealthState, CustomResourceSnapshot.ComputeHealthStatus(HealthReports, State) is not { } healthStatus ? Value.ForNull() : Value.ForString(healthStatus.ToString()), IsSensitive: false);
Dcp\ResourceSnapshotBuilder.cs (21)
52new(KnownProperties.Container.Image, container.Spec.Image), 53new(KnownProperties.Container.Id, containerId), 54new(KnownProperties.Container.Command, container.Spec.Command), 55new(KnownProperties.Container.Args, container.Status?.EffectiveArgs ?? []) { IsSensitive = true }, 56new(KnownProperties.Container.Ports, GetPorts()), 57new(KnownProperties.Container.Lifetime, GetContainerLifetime()), 58new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 59new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false }, 127new(KnownProperties.Executable.Path, executable.Spec.ExecutablePath), 128new(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory), 129new(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true }, 130new(KnownProperties.Executable.Pid, executable.Status?.ProcessId), 131new(KnownProperties.Project.Path, projectPath), 132new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 133new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false }, 150new(KnownProperties.Executable.Path, executable.Spec.ExecutablePath), 151new(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory), 152new(KnownProperties.Executable.Args, executable.Status?.EffectiveArgs ?? []) { IsSensitive = true }, 153new(KnownProperties.Executable.Pid, executable.Status?.ProcessId), 154new(KnownProperties.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false }, 155new(KnownProperties.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
Orchestrator\ApplicationOrchestrator.cs (2)
171Properties = s.Properties.SetResourceProperty(KnownProperties.Container.Image, context.Resource.TryGetContainerImageName(out var imageName) ? imageName : ""), 458Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(KnownProperties.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (3)
71Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, value, parameterResource.Secret), 109Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, ex.Message), 196Properties = s.Properties.SetResourceProperty(KnownProperties.Parameter.Value, inputValue, parameter.Secret),
Aspire.Hosting.Tests (12)
Orchestrator\ApplicationOrchestratorTests.cs (8)
48childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 95childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 194childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 198nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 202child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 262childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 309projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 420var connectionStringProp = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ConnectionString);
Orchestrator\ParameterProcessorTests.cs (4)
249Assert.Equal("value1", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 253Assert.Equal("value2", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 257Assert.Equal("secretValue", updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.Value); 258Assert.True(updates.Current.Snapshot.Properties.FirstOrDefault(p => p.Name == KnownProperties.Parameter.Value)?.IsSensitive ?? false);