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