82 references to KnownResourceTypes
Aspire.Hosting (56)
ApplicationModel\ResourceExtensions.cs (9)
1863
ProjectResource =>
KnownResourceTypes
.Project,
1864
ContainerResource =>
KnownResourceTypes
.Container,
1865
ContainerExecutableResource =>
KnownResourceTypes
.ContainerExec,
1866
DotnetToolResource =>
KnownResourceTypes
.Tool,
1867
ExecutableResource when resource.HasAnnotationOfType<IProjectMetadata>() =>
KnownResourceTypes
.Project,
1868
ExecutableResource =>
KnownResourceTypes
.Executable,
1869
ParameterResource =>
KnownResourceTypes
.Parameter,
1870
ConnectionStringResource =>
KnownResourceTypes
.ConnectionString,
1871
ExternalServiceResource =>
KnownResourceTypes
.ExternalService,
ConnectionStringBuilderExtensions.cs (1)
84
ResourceType =
KnownResourceTypes
.ConnectionString,
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),
Dcp\DcpExecutor.cs (2)
379
Container =>
KnownResourceTypes
.Container,
381
ContainerExec =>
KnownResourceTypes
.ContainerExec,
Dcp\ResourceSnapshotBuilder.cs (22)
51
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Container,
56
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Container, KnownProperties.Container.Image, container.Spec.Image),
57
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Container, KnownProperties.Container.Id, containerId),
58
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Container, KnownProperties.Container.Command, container.Spec.Command),
59
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Container, KnownProperties.Container.Args, effectiveArgs ?? [], isSensitive: true),
60
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Container, KnownProperties.Container.Ports, GetPorts()),
61
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Container, KnownProperties.Container.Lifetime, GetContainerLifetime()),
116
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Executable,
120
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
121
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.Args, effectiveArgs ?? [], isSensitive: true),
181
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Project,
185
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Project, KnownProperties.Executable.Path, executable.Spec.ExecutablePath),
186
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Project, KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
187
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Project, KnownProperties.Executable.Args, effectiveArgs ?? [], isSensitive: true),
188
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Project, KnownProperties.Executable.Pid, executable.Status?.ProcessId),
189
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Project, KnownProperties.Project.Path, projectPath),
190
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Project, KnownProperties.Project.LaunchProfile, launchProfileName),
205
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Executable,
209
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.Path, executable.Spec.ExecutablePath),
210
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
211
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.Args, effectiveArgs ?? [], isSensitive: true),
212
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.Pid, executable.Status?.ProcessId),
DotnetToolResourceExtensions.cs (1)
49
ResourceType =
KnownResourceTypes
.Tool,
Orchestrator\ApplicationOrchestrator.cs (7)
240
case
KnownResourceTypes
.Project:
241
case
KnownResourceTypes
.Executable:
244
case
KnownResourceTypes
.Tool:
253
case
KnownResourceTypes
.Container:
255
var (displayName, isHighlighted, sortOrder) = ResourcePropertySnapshotMetadata.Get(
KnownResourceTypes
.Container, KnownProperties.Container.Image);
591
if (context.ResourceType ==
KnownResourceTypes
.Container)
623
if (context.ResourceType ==
KnownResourceTypes
.Container)
ParameterResourceBuilderExtensions.cs (1)
303
ResourceType =
KnownResourceTypes
.Parameter,
Aspire.Hosting.Tests (26)
AddConnectionStringTests.cs (1)
66
Assert.Equal(
KnownResourceTypes
.ConnectionString, state.ResourceType);
Dashboard\ResourcePublisherTests.cs (1)
207
ResourceType =
KnownResourceTypes
.Container
Dcp\DcpExecutorTests.cs (3)
7996
Assert.Equal(
KnownResourceTypes
.Project, DcpExecutor.GetResourceType(dcpExecutable, dotnetProject));
7999
Assert.Equal(
KnownResourceTypes
.Executable, DcpExecutor.GetResourceType(dcpExecutable, plainExecutable));
8007
Assert.Equal(
KnownResourceTypes
.Tool, DcpExecutor.GetResourceType(dcpExecutable, dotnetTool));
Dcp\ResourceSnapshotBuilderTests.cs (1)
173
var projectSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
Orchestrator\ApplicationOrchestratorTests.cs (12)
441
await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None,
KnownResourceTypes
.Executable, resource.Resource, "test-resource-dcp"));
513
KnownResourceTypes
.Container,
542
KnownResourceTypes
.Container,
568
await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None,
KnownResourceTypes
.Tool, resource.Resource, "tool-dcp"));
639
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, waiter.Resource.Name));
688
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
746
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
797
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
851
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
859
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-def456"));
1310
KnownResourceTypes
.Container,
1357
KnownResourceTypes
.Container,
ResourceExtensionsTests.cs (2)
26
Assert.Equal(
KnownResourceTypes
.Project, resource.GetResourceType());
34
Assert.Equal(
KnownResourceTypes
.Executable, resource.GetResourceType());
ResourceNotificationTests.cs (6)
53
[InlineData(typeof(ProjectResource),
KnownResourceTypes
.Project)]
54
[InlineData(typeof(ContainerResource),
KnownResourceTypes
.Container)]
55
[InlineData(typeof(ExecutableResource),
KnownResourceTypes
.Executable)]
56
[InlineData(typeof(ParameterResource),
KnownResourceTypes
.Parameter)]
57
[InlineData(typeof(ConnectionStringResource),
KnownResourceTypes
.ConnectionString)]
58
[InlineData(typeof(ExternalServiceResource),
KnownResourceTypes
.ExternalService)]