91 references to KnownResourceTypes
Aspire.Hosting (56)
ApplicationModel\ResourceExtensions.cs (9)
1922
ProjectResource =>
KnownResourceTypes
.Project,
1923
ContainerResource =>
KnownResourceTypes
.Container,
1924
ContainerExecutableResource =>
KnownResourceTypes
.ContainerExec,
1925
DotnetToolResource =>
KnownResourceTypes
.Tool,
1926
ExecutableResource when resource.HasAnnotationOfType<IProjectMetadata>() =>
KnownResourceTypes
.Project,
1927
ExecutableResource =>
KnownResourceTypes
.Executable,
1928
ParameterResource =>
KnownResourceTypes
.Parameter,
1929
ConnectionStringResource =>
KnownResourceTypes
.ConnectionString,
1930
ExternalServiceResource =>
KnownResourceTypes
.ExternalService,
ConnectionStringBuilderExtensions.cs (1)
83
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)
356
Container =>
KnownResourceTypes
.Container,
358
ContainerExec =>
KnownResourceTypes
.ContainerExec,
Dcp\ResourceSnapshotBuilder.cs (22)
52
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Container,
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()),
117
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Executable,
121
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory),
122
ResourcePropertySnapshotMetadata.Create(
KnownResourceTypes
.Executable, KnownProperties.Executable.Args, effectiveArgs ?? [], isSensitive: true),
198
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Project,
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),
223
ResourceType = previous.ResourceType ??
KnownResourceTypes
.Executable,
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),
DotnetToolResourceExtensions.cs (1)
49
ResourceType =
KnownResourceTypes
.Tool,
Orchestrator\ApplicationOrchestrator.cs (7)
253
case
KnownResourceTypes
.Project:
254
case
KnownResourceTypes
.Executable:
257
case
KnownResourceTypes
.Tool:
266
case
KnownResourceTypes
.Container:
268
var (displayName, isHighlighted, sortOrder) = ResourcePropertySnapshotMetadata.Get(
KnownResourceTypes
.Container, KnownProperties.Container.Image);
649
if (context.ResourceType ==
KnownResourceTypes
.Container)
680
if (context.ResourceType ==
KnownResourceTypes
.Container)
ParameterResourceBuilderExtensions.cs (1)
333
ResourceType =
KnownResourceTypes
.Parameter,
Aspire.Hosting.Tests (35)
AddConnectionStringTests.cs (1)
66
Assert.Equal(
KnownResourceTypes
.ConnectionString, state.ResourceType);
Dashboard\ResourcePublisherTests.cs (2)
20
ResourceType =
KnownResourceTypes
.Container,
231
ResourceType =
KnownResourceTypes
.Container
Dcp\DcpExecutorTests.cs (4)
135
ResourceType =
KnownResourceTypes
.Executable,
9351
Assert.Equal(
KnownResourceTypes
.Project, DcpExecutor.GetResourceType(dcpExecutable, dotnetProject));
9354
Assert.Equal(
KnownResourceTypes
.Executable, DcpExecutor.GetResourceType(dcpExecutable, plainExecutable));
9362
Assert.Equal(
KnownResourceTypes
.Tool, DcpExecutor.GetResourceType(dcpExecutable, dotnetTool));
Dcp\ResourceSnapshotBuilderTests.cs (5)
200
}).ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
245
}).ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
247
Assert.Equal(
KnownResourceTypes
.Project, snapshot.ResourceType);
291
}).ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
678
var projectSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
Orchestrator\ApplicationOrchestratorTests.cs (13)
572
CancellationToken.None,
KnownResourceTypes
.Executable, resource.Resource, resource.Resource.Name,
991
await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None,
KnownResourceTypes
.Executable, resource.Resource, "test-resource-dcp"));
1063
KnownResourceTypes
.Container,
1092
KnownResourceTypes
.Container,
1118
await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None,
KnownResourceTypes
.Tool, resource.Resource, "tool-dcp"));
1189
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, waiter.Resource.Name));
1238
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1296
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1347
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1401
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1409
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-def456"));
1861
KnownResourceTypes
.Container,
1909
KnownResourceTypes
.Container,
ResourceCommandAnnotationTests.cs (2)
227
ResourceType =
KnownResourceTypes
.Executable,
290
ResourceType =
KnownResourceTypes
.Project,
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)]