7 instantiations of WorkloadIdentity
Aspire.Hosting.Native.Core (2)
Aspire.Hosting.Native.Core.Tests (5)
DcpWorkloadCleanupTests.cs (5)
25var prepared = await executor.PrepareAsync(new(Guid.NewGuid(), Guid.NewGuid()), plan,
41await using var prepared = await executor.PrepareAsync(new(Guid.NewGuid(), Guid.NewGuid()), plan,
234using var workload = new ResourceWorkload(new(Guid.NewGuid(), Guid.NewGuid()),
240await executor.StartAsync(new(Guid.NewGuid(), Guid.NewGuid()),
271new WorkloadIdentity(Guid.NewGuid(), Guid.NewGuid()),
21 references to WorkloadIdentity
Aspire.Hosting.Native.Core (6)
Runtime\ResourceWorkload.cs (6)
74Task<IWorkloadLease> StartAsync(WorkloadIdentity identity, WorkloadPlan plan, CancellationToken cancellationToken);
80Task<IWorkloadPreparation> PrepareAsync(WorkloadIdentity identity, WorkloadPlan template, CancellationToken cancellationToken);
101public Task<IWorkloadLease> StartAsync(WorkloadIdentity identity, WorkloadPlan plan, CancellationToken cancellationToken) =>
107WorkloadIdentity identity,
121public ResourceWorkload(WorkloadIdentity identity, Func<WorkloadPlan> resolvePlan, IWorkloadExecutor executor,
129public ResourceWorkload(WorkloadIdentity identity, WorkloadPlan plan, IWorkloadExecutor executor,
Aspire.Hosting.Native.Core.Tests (11)
TestServices\WorkloadTestExecutor.cs (11)
14public ConcurrentQueue<WorkloadIdentity> Started { get; } = new();
16public ConcurrentQueue<WorkloadIdentity> Prepared { get; } = new();
17public ConcurrentQueue<WorkloadIdentity> ReleasedPreparations { get; } = new();
18public ConcurrentQueue<WorkloadIdentity> Removed { get; } = new();
21public Func<WorkloadIdentity, CancellationToken, Task>? BeforePrepare { get; init; }
23public Func<WorkloadIdentity, CancellationToken, Task>? BeforeStartResource { get; init; }
25public Func<WorkloadIdentity, Task>? BeforeCleanup { get; init; }
33public async Task<IWorkloadPreparation> PrepareAsync(WorkloadIdentity identity, WorkloadPlan template, CancellationToken cancellationToken)
45public async Task<IWorkloadLease> StartAsync(WorkloadIdentity identity, WorkloadPlan plan, CancellationToken cancellationToken)
66private sealed class Lease(WorkloadTestExecutor executor, WorkloadIdentity identity, WorkloadPlan plan) : IWorkloadLease
94private sealed class Preparation(WorkloadTestExecutor executor, WorkloadIdentity identity, WorkloadPlan template) : IWorkloadPreparation
Aspire.Hosting.Native.Server (4)