94 references to KnownResourceTypes
Aspire.Hosting (56)
ApplicationModel\ResourceExtensions.cs (9)
2025
ProjectResource =>
KnownResourceTypes
.Project,
2026
ContainerResource =>
KnownResourceTypes
.Container,
2027
ContainerExecutableResource =>
KnownResourceTypes
.ContainerExec,
2028
DotnetToolResource =>
KnownResourceTypes
.Tool,
2029
ExecutableResource when resource.HasAnnotationOfType<IProjectMetadata>() =>
KnownResourceTypes
.Project,
2030
ExecutableResource =>
KnownResourceTypes
.Executable,
2031
ParameterResource =>
KnownResourceTypes
.Parameter,
2032
ConnectionStringResource =>
KnownResourceTypes
.ConnectionString,
2033
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)
376
Container =>
KnownResourceTypes
.Container,
378
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)
258
case
KnownResourceTypes
.Project:
259
case
KnownResourceTypes
.Executable:
262
case
KnownResourceTypes
.Tool:
271
case
KnownResourceTypes
.Container:
273
var (displayName, isHighlighted, sortOrder) = ResourcePropertySnapshotMetadata.Get(
KnownResourceTypes
.Container, KnownProperties.Container.Image);
654
if (context.ResourceType ==
KnownResourceTypes
.Container)
685
if (context.ResourceType ==
KnownResourceTypes
.Container)
ParameterResourceBuilderExtensions.cs (1)
339
ResourceType =
KnownResourceTypes
.Parameter,
Aspire.Hosting.Tests (38)
AddConnectionStringTests.cs (1)
362
Assert.Equal(
KnownResourceTypes
.ConnectionString, state.ResourceType);
Dashboard\ResourcePublisherTests.cs (2)
20
ResourceType =
KnownResourceTypes
.Container,
231
ResourceType =
KnownResourceTypes
.Container
Dcp\DcpExecutorTests.cs (4)
203
ResourceType =
KnownResourceTypes
.Executable,
9878
Assert.Equal(
KnownResourceTypes
.Project, DcpExecutor.GetResourceType(dcpExecutable, dotnetProject));
9881
Assert.Equal(
KnownResourceTypes
.Executable, DcpExecutor.GetResourceType(dcpExecutable, plainExecutable));
9889
Assert.Equal(
KnownResourceTypes
.Tool, DcpExecutor.GetResourceType(dcpExecutable, dotnetTool));
Dcp\ResourceSnapshotBuilderTests.cs (5)
263
}).ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
308
}).ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
310
Assert.Equal(
KnownResourceTypes
.Project, snapshot.ResourceType);
354
}).ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
741
var projectSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot(
KnownResourceTypes
.Project));
Orchestrator\ApplicationOrchestratorTests.cs (16)
631
CancellationToken.None,
KnownResourceTypes
.Executable, resource.Resource, resource.Resource.Name,
1050
await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None,
KnownResourceTypes
.Executable, resource.Resource, "test-resource-dcp"));
1192
await events.PublishAsync(new OnResourceStartingContext(cts.Token,
KnownResourceTypes
.Container, resource, resource.Name));
1323
KnownResourceTypes
.Container,
1352
KnownResourceTypes
.Container,
1378
await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None,
KnownResourceTypes
.Tool, resource.Resource, "tool-dcp"));
1449
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, waiter.Resource.Name));
1485
cts.Token,
KnownResourceTypes
.Executable, caller.Resource, caller.Resource.Name));
1551
cts.Token,
KnownResourceTypes
.Executable, caller.Resource, caller.Resource.Name));
1626
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1684
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1735
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1789
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-abc123"));
1797
CancellationToken.None,
KnownResourceTypes
.Executable, waiter.Resource, "waiter-def456"));
2250
KnownResourceTypes
.Container,
2298
KnownResourceTypes
.Container,
ResourceCommandAnnotationTests.cs (2)
230
ResourceType =
KnownResourceTypes
.Executable,
294
ResourceType =
KnownResourceTypes
.Project,
ResourceExtensionsTests.cs (2)
41
Assert.Equal(
KnownResourceTypes
.Project, resource.GetResourceType());
49
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)]