265 references to KnownProperties
Aspire.Hosting (104)
ApplicationModel\CustomResourceKnownProperties.cs (3)
16
public static string Source { get; } =
KnownProperties
.Resource.Source;
21
public static string ConnectionString { get; } =
KnownProperties
.Resource.ConnectionString;
26
public static string ConnectionProperties { get; } =
KnownProperties
.Resource.ConnectionProperties;
ApplicationModel\DotnetToolResource.cs (3)
51
yield return CreateHighlightedProperty(
KnownProperties
.Tool.Package, toolConfig.PackageId, ResourcePropertyToolPackageDisplayName, sortOrder: 0);
52
yield return CreateHighlightedProperty(
KnownProperties
.Tool.Version, toolConfig.Version, ResourcePropertyToolVersionDisplayName, sortOrder: 1);
53
yield return new(
KnownProperties
.Resource.Source, toolConfig.PackageId);
ApplicationModel\ParameterResource.cs (1)
525
return new(
KnownProperties
.Parameter.Value, value)
ApplicationModel\ResourceNotificationService.cs (8)
665
Properties = s.Properties.SetResourceProperty(
KnownProperties
.Resource.WaitingFor, waitingFor)
681
Properties = s.Properties.RemoveResourceProperty(
KnownProperties
.Resource.WaitingFor)
902
Properties = newState.Properties.RemoveResourceProperty(
KnownProperties
.Resource.WaitingFor)
927
Properties = newState.Properties.SetResourceProperty(
KnownProperties
.Resource.ExcludeFromMcp, true)
1158
return (snapshot with { Properties = snapshot.Properties.RemoveResourceProperty(
KnownProperties
.Resource.UnresolvedParameters) }, null, false);
1167
KnownProperties
.Resource.UnresolvedParameters, waits.Keys.Order(StringComparers.ResourceName).ToArray())
1178
Properties = snapshot.Properties.RemoveResourceProperty(
KnownProperties
.Resource.UnresolvedParameters)
1595
if (string.Equals(property.Name,
KnownProperties
.Resource.WaitingFor, StringComparisons.ResourcePropertyName))
ApplicationModel\ResourceTraitSnapshotProperties.cs (4)
26
var result = properties.Where(p => !p.Name.StartsWith(
KnownProperties
.Resource.TraitPrefix, StringComparison.Ordinal) &&
27
p.Name !=
KnownProperties
.Resource.DisplayOrder).ToImmutableArray();
31
result = result.Add(new ResourcePropertySnapshot(
KnownProperties
.Resource.TraitPrefix + group.Key, values)
39
result = result.Add(new ResourcePropertySnapshot(
KnownProperties
.Resource.DisplayOrder, displayOrder!.Order.ToString(CultureInfo.InvariantCulture)));
ApplicationModel\TerminalResourceSnapshotProperties.cs (5)
57
.Add(new ResourcePropertySnapshot(
KnownProperties
.Terminal.Enabled, "true") { IsSensitive = false })
58
.Add(new ResourcePropertySnapshot(
KnownProperties
.Terminal.AutoFit, terminalAnnotation.Options.HasExplicitDimensions ? "false" : "true") { IsSensitive = false })
59
.Add(new ResourcePropertySnapshot(
KnownProperties
.Terminal.ReplicaIndex, replicaIndex.ToString(CultureInfo.InvariantCulture)) { IsSensitive = false })
60
.Add(new ResourcePropertySnapshot(
KnownProperties
.Terminal.ReplicaCount, replicaCount.ToString(CultureInfo.InvariantCulture)) { IsSensitive = false });
69
new ResourcePropertySnapshot(
KnownProperties
.Terminal.ConsumerUdsPath, consumerUdsPath) { IsSensitive = true });
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1249
if (string.Equals(prop.Name,
KnownProperties
.Resource.WaitingFor, StringComparisons.ResourcePropertyName))
Dashboard\ResourcePropertySnapshotMetadata.cs (13)
40
(KnownResourceTypes.Container,
KnownProperties
.Container.Image) => (ResourcePropertyContainerImageDisplayName, true, 0),
41
(KnownResourceTypes.Container,
KnownProperties
.Container.Id) => (ResourcePropertyContainerIdDisplayName, true, 1),
42
(KnownResourceTypes.Container,
KnownProperties
.Container.Command) => (ResourcePropertyContainerCommandDisplayName, true, 2),
43
(KnownResourceTypes.Container,
KnownProperties
.Container.Args) => (ResourcePropertyContainerArgumentsDisplayName, true, 3),
44
(KnownResourceTypes.Container,
KnownProperties
.Container.Ports) => (ResourcePropertyContainerPortsDisplayName, true, 4),
45
(KnownResourceTypes.Container,
KnownProperties
.Container.Lifetime) => (ResourcePropertyContainerLifetimeDisplayName, true, 5),
46
(KnownResourceTypes.Executable,
KnownProperties
.Executable.Path) => (ResourcePropertyExecutablePathDisplayName, true, 0),
47
(KnownResourceTypes.Executable,
KnownProperties
.Executable.WorkDir) => (ResourcePropertyExecutableWorkingDirectoryDisplayName, true, 1),
48
(KnownResourceTypes.Executable,
KnownProperties
.Executable.Args) => (ResourcePropertyExecutableArgumentsDisplayName, true, 2),
49
(KnownResourceTypes.Executable,
KnownProperties
.Executable.Pid) => (ResourcePropertyExecutableProcessIdDisplayName, true, 3),
50
(KnownResourceTypes.Project,
KnownProperties
.Project.Path) => (ResourcePropertyProjectPathDisplayName, true, 0),
51
(KnownResourceTypes.Project,
KnownProperties
.Project.LaunchProfile) => (ResourcePropertyProjectLaunchProfileDisplayName, true, 1),
52
(KnownResourceTypes.Project,
KnownProperties
.Executable.Pid) => (ResourcePropertyExecutableProcessIdDisplayName, true, 2),
Dashboard\ResourceSnapshot.cs (11)
43
yield return (
KnownProperties
.Resource.Uid, Value.ForString(Uid), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
44
yield return (
KnownProperties
.Resource.Name, Value.ForString(Name), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
45
yield return (
KnownProperties
.Resource.Type, Value.ForString(ResourceType), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
48
yield return (
KnownProperties
.Resource.ResourceTypeDisplayName, Value.ForString(ResourceTypeDisplayName), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
50
yield return (
KnownProperties
.Resource.DisplayName, Value.ForString(DisplayName), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
51
yield return (
KnownProperties
.Resource.State, State is null ? Value.ForNull() : Value.ForString(State), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
52
yield return (
KnownProperties
.Resource.ExitCode, ExitCode is null ? Value.ForNull() : Value.ForString(ExitCode.Value.ToString("D", CultureInfo.InvariantCulture)), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
53
yield return (
KnownProperties
.Resource.CreateTime, CreationTimeStamp is null ? Value.ForNull() : Value.ForString(CreationTimeStamp.Value.ToString("O")), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
54
yield return (
KnownProperties
.Resource.StartTime, StartTimeStamp is null ? Value.ForNull() : Value.ForString(StartTimeStamp.Value.ToString("O")), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
55
yield return (
KnownProperties
.Resource.StopTime, StopTimeStamp is null ? Value.ForNull() : Value.ForString(StopTimeStamp.Value.ToString("O")), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
56
yield return (
KnownProperties
.Resource.HealthState, CustomResourceSnapshot.ComputeHealthStatus(HealthReports, State) is not { } healthStatus ? Value.ForNull() : Value.ForString(healthStatus.ToString()), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
Dcp\ResourceSnapshotBuilder.cs (51)
57
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Container,
KnownProperties
.Container.Image, container.Spec.Image),
58
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Container,
KnownProperties
.Container.Id, containerId),
59
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Container,
KnownProperties
.Container.Command, container.Spec.Command),
60
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Container,
KnownProperties
.Container.Args, effectiveArgs ?? [], isSensitive: true),
61
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Container,
KnownProperties
.Container.Ports, GetPorts()),
62
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Container,
KnownProperties
.Container.Lifetime, GetContainerLifetime()),
63
new(
KnownProperties
.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
64
new(
KnownProperties
.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
121
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Executable,
KnownProperties
.Executable.WorkDir, executable.Spec.WorkingDirectory),
122
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Executable,
KnownProperties
.Executable.Args, effectiveArgs ?? [], isSensitive: true),
123
new(
KnownProperties
.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
124
new(
KnownProperties
.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
179
properties = properties.SetResourceProperty(
KnownProperties
.Resource.SourcePath, sourceResource.WorkingDirectory);
184
? properties.SetResourceProperty(
KnownProperties
.Resource.LaunchConfigurationType, launchConfigurationType)
185
: properties.RemoveResourceProperty(
KnownProperties
.Resource.LaunchConfigurationType);
187
.RemoveResourceProperty(
KnownProperties
.Project.LaunchCommand)
188
.RemoveResourceProperty(
KnownProperties
.Project.Configuration)
189
.RemoveResourceProperty(
KnownProperties
.Project.TargetFramework)
190
.RemoveResourceProperty(
KnownProperties
.Project.TargetPath)
191
.RemoveResourceProperty(
KnownProperties
.Project.UseAppHost);
202
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Project,
KnownProperties
.Executable.Path, executable.Spec.ExecutablePath),
203
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Project,
KnownProperties
.Executable.WorkDir, executable.Spec.WorkingDirectory),
204
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Project,
KnownProperties
.Executable.Args, effectiveArgs ?? [], isSensitive: true),
205
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Project,
KnownProperties
.Executable.Pid, executable.Status?.ProcessId),
206
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Project,
KnownProperties
.Project.Path, projectPath),
207
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Project,
KnownProperties
.Project.LaunchProfile, launchProfileName),
208
new(
KnownProperties
.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
209
new(
KnownProperties
.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
227
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Executable,
KnownProperties
.Executable.Path, executable.Spec.ExecutablePath),
228
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Executable,
KnownProperties
.Executable.WorkDir, executable.Spec.WorkingDirectory),
229
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Executable,
KnownProperties
.Executable.Args, effectiveArgs ?? [], isSensitive: true),
230
ResourcePropertySnapshotMetadata.Create(KnownResourceTypes.Executable,
KnownProperties
.Executable.Pid, executable.Status?.ProcessId),
231
new(
KnownProperties
.Resource.AppArgs, launchArguments?.Args) { IsSensitive = launchArguments?.IsSensitive ?? false },
232
new(
KnownProperties
.Resource.AppArgsSensitivity, launchArguments?.ArgsAreSensitive) { IsSensitive = launchArguments?.IsSensitive ?? false },
282
directProperties.Add(new(
KnownProperties
.Project.LaunchCommand, "direct"));
285
directProperties.Add(new(
KnownProperties
.Project.Configuration, directBuildConfiguration));
289
directProperties.Add(new(
KnownProperties
.Project.TargetPath, buildTarget.TargetPath));
290
directProperties.Add(new(
KnownProperties
.Project.UseAppHost, buildTarget.UseAppHost));
315
? [new(
KnownProperties
.Project.LaunchCommand, "ide"), new(
KnownProperties
.Project.Configuration, buildConfiguration)]
316
: [new(
KnownProperties
.Project.LaunchCommand, "ide")];
319
return [new(
KnownProperties
.Project.LaunchCommand, null)];
325
return [new(
KnownProperties
.Project.LaunchCommand, null)];
332
return [new(
KnownProperties
.Project.LaunchCommand, null)];
359
return [new(
KnownProperties
.Project.LaunchCommand, null)];
369
return [new(
KnownProperties
.Project.LaunchCommand, null)];
389
return [new(
KnownProperties
.Project.LaunchCommand, null)];
399
return [new(
KnownProperties
.Project.LaunchCommand, null)];
406
properties.Add(new(
KnownProperties
.Project.LaunchCommand, launchCommand));
409
properties.Add(new(
KnownProperties
.Project.Configuration, configuration));
414
properties.Add(new(
KnownProperties
.Project.TargetFramework, targetFramework));
Orchestrator\ApplicationOrchestrator.cs (3)
273
var (displayName, isHighlighted, sortOrder) = ResourcePropertySnapshotMetadata.Get(KnownResourceTypes.Container,
KnownProperties
.Container.Image);
280
KnownProperties
.Container.Image,
892
Properties = parent is null ? s.Properties : s.Properties.SetResourceProperty(
KnownProperties
.Resource.ParentName, parent.GetResolvedResourceNames()[0]),
Orchestrator\ParameterProcessor.cs (1)
996
? s.Properties.RemoveResourceProperty(
KnownProperties
.Parameter.Value)
Aspire.Hosting.Blazor (2)
BlazorGatewayExtensions.cs (2)
202
new(
KnownProperties
.Project.Path, projectPath)
227
new(
KnownProperties
.Project.Path, resolvedPath)
Aspire.Hosting.Blazor.Tests (1)
AddBlazorGatewayTests.cs (1)
49
Assert.Equal(
KnownProperties
.Project.Path, property.Name);
Aspire.Hosting.Tests (156)
AddConnectionStringTests.cs (2)
78
Assert.Equal(
KnownProperties
.Resource.UnresolvedParameters, unresolved.Name);
228
var unresolved = Assert.Single(waiting.Snapshot.Properties, property => property.Name ==
KnownProperties
.Resource.UnresolvedParameters);
AddParameterTests.cs (5)
100
? [new ResourcePropertySnapshot(
KnownProperties
.Resource.WaitingFor, new[] { dependency.Resource.Name })]
133
Assert.Equal(
KnownProperties
.Resource.WaitingFor, waitingFor.Name);
492
Assert.Empty(first.Snapshot.Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));
493
Assert.Empty(second.Snapshot.Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));
523
var property = state.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
Dashboard\ResourcePublisherTests.cs (4)
32
Assert.Equal("Container", Assert.Single(resource.Properties, p => p.Name ==
KnownProperties
.Resource.Type).Value.StringValue);
33
var serviceProperties = resource.Properties.Where(p => p.Name ==
KnownProperties
.Resource.ResourceTypeDisplayName).Select(p => p.Value.StringValue);
43
KnownProperties
.Resource.ConnectionProperties,
50
var property = Assert.Single(snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.ConnectionProperties);
Dcp\DcpExecutorTests.cs (8)
901
Assert.Equal(["--port", "52731"], GetEnumerablePropertyValue<string>(snapshot,
KnownProperties
.Resource.AppArgs).ToArray());
902
Assert.Equal(effectiveArgs, GetEnumerablePropertyValue<string>(snapshot,
KnownProperties
.Executable.Args).ToArray());
947
Assert.Equal(["--port", "5678"], GetEnumerablePropertyValue<string>(snapshot,
KnownProperties
.Resource.AppArgs).ToArray());
948
Assert.Equal(effectiveArgs, GetEnumerablePropertyValue<string>(snapshot,
KnownProperties
.Container.Args).ToArray());
11565
var unresolved = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
11578
Assert.Empty(started.Snapshot.Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));
11655
Assert.Empty(GetSnapshot(instanceName).Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));
11688
var unresolved = Assert.Single(snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
Dcp\ResourceSnapshotBuilderTests.cs (86)
35
AssertHighlightedProperty(snapshot,
KnownProperties
.Container.Image, "Container image", isSensitive: false, sortOrder: 0);
36
AssertHighlightedProperty(snapshot,
KnownProperties
.Container.Id, "Container ID", isSensitive: false, sortOrder: 1);
37
AssertHighlightedProperty(snapshot,
KnownProperties
.Container.Command, "Container command", isSensitive: false, sortOrder: 2);
38
AssertHighlightedProperty(snapshot,
KnownProperties
.Container.Args, "Container arguments", isSensitive: true, sortOrder: 3);
39
AssertHighlightedProperty(snapshot,
KnownProperties
.Container.Ports, "Container ports", isSensitive: false, sortOrder: 4);
40
AssertHighlightedProperty(snapshot,
KnownProperties
.Container.Lifetime, "Container lifetime", isSensitive: false, sortOrder: 5);
55
AssertHighlightedProperty(snapshot,
KnownProperties
.Executable.Path, "Executable path", isSensitive: false, sortOrder: 0);
56
AssertHighlightedProperty(snapshot,
KnownProperties
.Executable.WorkDir, "Working directory", isSensitive: false, sortOrder: 1);
57
AssertHighlightedProperty(snapshot,
KnownProperties
.Executable.Args, "Executable arguments", isSensitive: true, sortOrder: 2);
58
AssertHighlightedProperty(snapshot,
KnownProperties
.Executable.Pid, "Process ID", isSensitive: false, sortOrder: 3);
82
AssertDefaultProperty(snapshot,
KnownProperties
.Executable.Path, isSensitive: false);
83
AssertDefaultProperty(snapshot,
KnownProperties
.Executable.WorkDir, isSensitive: false);
84
AssertDefaultProperty(snapshot,
KnownProperties
.Executable.Args, isSensitive: true);
85
AssertHighlightedProperty(snapshot,
KnownProperties
.Project.Path, "Project path", isSensitive: false, sortOrder: 0);
86
AssertHighlightedProperty(snapshot,
KnownProperties
.Project.LaunchProfile, "Launch profile", isSensitive: false, sortOrder: 1);
87
AssertHighlightedProperty(snapshot,
KnownProperties
.Executable.Pid, "Process ID", isSensitive: false, sortOrder: 2);
111
var launchConfigurationType = Assert.Single(snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.LaunchConfigurationType);
158
Assert.Equal("ide", GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value);
161
Assert.Equal(configuration, GetProperty(snapshot,
KnownProperties
.Project.Configuration).Value);
165
Assert.Empty(snapshot.Properties.Where(property => property.Name ==
KnownProperties
.Project.Configuration));
167
Assert.Empty(snapshot.Properties.Where(property => property.Name ==
KnownProperties
.Project.TargetFramework));
168
Assert.False(GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).IsSensitive);
169
Assert.True(GetProperty(snapshot,
KnownProperties
.Executable.Args).IsSensitive);
213
Assert.Equal("azure-functions", GetProperty(snapshot,
KnownProperties
.Resource.LaunchConfigurationType).Value);
215
snapshot.Properties.Where(property => property.Name is
KnownProperties
.Project.LaunchCommand
216
or
KnownProperties
.Project.Configuration or
KnownProperties
.Project.TargetFramework),
219
Assert.Equal(
KnownProperties
.Project.LaunchCommand, property.Name);
223
Assert.True(GetProperty(snapshot,
KnownProperties
.Executable.Args).IsSensitive);
265
Assert.Equal("ide", GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value);
266
Assert.Equal("Release", GetProperty(snapshot,
KnownProperties
.Project.Configuration).Value);
267
Assert.Empty(snapshot.Properties.Where(property => property.Name is
KnownProperties
.Project.TargetPath
268
or
KnownProperties
.Project.UseAppHost));
311
Assert.Equal("/app/project.csproj", GetProperty(snapshot,
KnownProperties
.Project.Path).Value);
312
Assert.Equal(executablePath, GetProperty(snapshot,
KnownProperties
.Executable.Path).Value);
313
Assert.Equal(1234, GetProperty(snapshot,
KnownProperties
.Executable.Pid).Value);
314
Assert.Equal("direct", GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value);
317
snapshot.Properties.Where(property => property.Name ==
KnownProperties
.Project.Configuration).Select(property => property.Value));
318
Assert.Equal(targetPath, GetProperty(snapshot,
KnownProperties
.Project.TargetPath).Value);
319
Assert.Equal(useAppHost, GetProperty(snapshot,
KnownProperties
.Project.UseAppHost).Value);
320
Assert.False(GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).IsSensitive);
321
Assert.True(GetProperty(snapshot,
KnownProperties
.Executable.Args).IsSensitive);
356
Assert.Empty(snapshot.Properties.Where(property => property.Name is
KnownProperties
.Project.LaunchCommand
357
or
KnownProperties
.Project.Configuration or
KnownProperties
.Project.TargetFramework
358
or
KnownProperties
.Project.TargetPath or
KnownProperties
.Project.UseAppHost));
418
Assert.Equal(expectedLaunchCommand, Assert.IsType<string>(GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value));
419
Assert.Equal("Release", Assert.IsType<string>(GetProperty(snapshot,
KnownProperties
.Project.Configuration).Value));
420
Assert.Equal("net10.0", Assert.IsType<string>(GetProperty(snapshot,
KnownProperties
.Project.TargetFramework).Value));
421
Assert.True(GetProperty(snapshot,
KnownProperties
.Executable.Args).IsSensitive);
422
Assert.False(GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).IsSensitive);
423
Assert.False(GetProperty(snapshot,
KnownProperties
.Project.Configuration).IsSensitive);
424
Assert.False(GetProperty(snapshot,
KnownProperties
.Project.TargetFramework).IsSensitive);
456
new(
KnownProperties
.Project.Configuration, "stale-configuration"),
457
new(
KnownProperties
.Project.TargetFramework, "stale-framework"),
465
Assert.Null(GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value);
466
Assert.Empty(snapshot.Properties.Where(property => property.Name ==
KnownProperties
.Project.Configuration));
467
Assert.Empty(snapshot.Properties.Where(property => property.Name ==
KnownProperties
.Project.TargetFramework));
501
Properties = [new(
KnownProperties
.Project.Configuration, "stale-configuration")]
508
Assert.Empty(snapshot.Properties.Where(property => property.Name ==
KnownProperties
.Project.Configuration));
509
Assert.Null(GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value);
541
snapshot.Properties.Where(property => property.Name is
KnownProperties
.Project.LaunchCommand
542
or
KnownProperties
.Project.Configuration or
KnownProperties
.Project.TargetFramework),
545
Assert.Equal(
KnownProperties
.Project.LaunchCommand, property.Name);
570
snapshot.Properties.Where(property => property.Name is
KnownProperties
.Project.LaunchCommand
571
or
KnownProperties
.Project.Configuration or
KnownProperties
.Project.TargetFramework),
574
Assert.Equal(
KnownProperties
.Project.LaunchCommand, property.Name);
577
Assert.True(GetProperty(snapshot,
KnownProperties
.Executable.Args).IsSensitive);
603
Assert.Equal(launchCommand, GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand).Value);
604
Assert.Equal("Release", GetProperty(snapshot,
KnownProperties
.Project.Configuration).Value);
605
Assert.Equal("net10.0", GetProperty(snapshot,
KnownProperties
.Project.TargetFramework).Value);
626
var launchCommand = GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand);
650
var launchCommand = GetProperty(snapshot,
KnownProperties
.Project.LaunchCommand);
675
Assert.Equal(resource.WorkingDirectory, GetProperty(snapshot,
KnownProperties
.Resource.SourcePath).Value);
681
Assert.Equal(resource.WorkingDirectory, GetProperty(snapshot,
KnownProperties
.Resource.SourcePath).Value);
690
Assert.Equal(resource.WorkingDirectory, GetProperty(snapshot,
KnownProperties
.Resource.SourcePath).Value);
743
AssertHighlightedProperty(projectSnapshot,
KnownProperties
.Project.Path, "Project path", isSensitive: false, sortOrder: 0);
744
AssertHighlightedProperty(projectSnapshot,
KnownProperties
.Project.LaunchProfile, "Launch profile", isSensitive: false, sortOrder: 1);
762
Assert.Equal(["--secret", "resolved-secret"], GetEnumerablePropertyValue<string>(snapshot,
KnownProperties
.Resource.AppArgs).ToArray());
763
Assert.Equal([0, 1], GetEnumerablePropertyValue<int>(snapshot,
KnownProperties
.Resource.AppArgsSensitivity).ToArray());
764
Assert.True(GetProperty(snapshot,
KnownProperties
.Resource.AppArgs).IsSensitive);
765
Assert.True(GetProperty(snapshot,
KnownProperties
.Resource.AppArgsSensitivity).IsSensitive);
780
Assert.Equal(["-port", DcpTemplateArgument], GetEnumerablePropertyValue<string>(snapshot,
KnownProperties
.Resource.AppArgs).ToArray());
DistributedApplicationTests.cs (5)
421
var servicePid = Assert.IsType<int>(GetResourcePropertyValue(normalResource,
KnownProperties
.Executable.Pid));
2245
GetResourcePropertyValue(e,
KnownProperties
.Container.Id) is string,
2250
GetResourcePropertyValue(e,
KnownProperties
.Executable.Pid) is int,
2253
var containerId = Assert.IsType<string>(GetResourcePropertyValue(containerEvent,
KnownProperties
.Container.Id));
2254
var executablePid = Assert.IsType<int>(GetResourcePropertyValue(executableEvent,
KnownProperties
.Executable.Pid));
DotnetToolResourceTests.cs (3)
24
AssertToolProperty(properties[
KnownProperties
.Tool.Package], "dotnet-dump", MessageStrings.ResourcePropertyToolPackageDisplayName, expectedSortOrder: 0);
25
AssertToolProperty(properties[
KnownProperties
.Tool.Version], "1.2.3", MessageStrings.ResourcePropertyToolVersionDisplayName, expectedSortOrder: 1);
27
var sourceProperty = properties[
KnownProperties
.Resource.Source];
Orchestrator\ApplicationOrchestratorTests.cs (26)
61
var unresolved = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
666
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
714
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
815
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
819
nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
823
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
884
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
932
projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
1079
var connectionString = Assert.Single(currentState.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.ConnectionString);
1175
var unresolved = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
1184
Assert.Empty(started.Snapshot.Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));
1185
var connectionString = Assert.Single(started.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.ConnectionString);
1231
var unresolved = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
1244
Assert.Empty(canceled.Snapshot.Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));
1286
Assert.Equal(
KnownProperties
.Resource.ConnectionString, connectionStringProperty.Name);
1292
Assert.Equal(
KnownProperties
.Resource.ConnectionProperties, connectionPropertiesProperty.Name);
1495
var waitingFor = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
1512
var unresolved = Assert.Single(blocked.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
1559
var waitingFor = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
1579
Assert.Equal(
KnownProperties
.Resource.UnresolvedParameters, property.Name);
1991
var waitingFor = waitingEvent.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.WaitingFor)?.Value;
2355
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
2359
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
2412
childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
2416
child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
2466
childProjectParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.ParentName)?.Value?.ToString();
Orchestrator\ParameterProcessorTests.cs (5)
145
Assert.DoesNotContain(updates.Current.Snapshot.Properties, property => property.Name ==
KnownProperties
.Parameter.Value);
1951
var property = Assert.Single(snapshot.Properties, p => p.Name ==
KnownProperties
.Parameter.Value);
2496
Assert.DoesNotContain(updates.Current.Snapshot.Properties, property => property.Name ==
KnownProperties
.Parameter.Value);
2525
Assert.DoesNotContain(updates.Current.Snapshot.Properties, property => property.Name ==
KnownProperties
.Parameter.Value);
2672
var valueProperty = Assert.Single(updates.Current.Snapshot.Properties, property => property.Name ==
KnownProperties
.Parameter.Value);
ResourceNotificationTests.cs (9)
556
Assert.DoesNotContain(completedWaitingEvent.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
670
Assert.DoesNotContain(completedWaitingEvent.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
718
Assert.DoesNotContain(completedWaitingEvent.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
992
Assert.DoesNotContain(completedWaitingEvent.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
1004
Properties = [new ResourcePropertySnapshot(
KnownProperties
.Resource.WaitingFor, new[] { "dependency" })]
1008
Assert.Contains(waitingEvent.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
1016
Assert.DoesNotContain(runningEvent.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.WaitingFor);
1034
Properties = [new ResourcePropertySnapshot(
KnownProperties
.Resource.WaitingFor, new[] { dependency.Name })]
2078
var property = resourceEvent.Snapshot.Properties.SingleOrDefault(p => p.Name ==
KnownProperties
.Resource.WaitingFor);
ResourceTraitBuilderTests.cs (1)
81
Assert.Equal(["resource.trait.Aspire_Tag",
KnownProperties
.Resource.DisplayOrder], properties.Select(p => p.Name));
WithTerminalTests.cs (2)
110
var autoFit = Assert.Single(properties, p => p.Name ==
KnownProperties
.Terminal.AutoFit);
138
var autoFit = Assert.Single(properties, p => p.Name ==
KnownProperties
.Terminal.AutoFit);
Aspire.Hosting.TestUtilities (2)
Utils\ParameterWaitTestHelpers.cs (2)
21
var unresolved = Assert.Single(waiting.Snapshot.Properties, p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters);
29
Assert.Empty(resumed.Snapshot.Properties.Where(p => p.Name ==
KnownProperties
.Resource.UnresolvedParameters));