DistributedApplicationFactory
Class net10.0
Factory for creating a distributed application for testing.
namespace Aspire.Hosting.Testing;
public class DistributedApplicationFactory : System.IAsyncDisposable, System.IDisposable{ // ...} IAsyncDisposableIDisposable
8 members
Constructors2
Section titled ConstructorsDistributedApplicationFactory(Type, string[]) Factory for creating a distributed application for testing.
DistributedApplicationFactory(Type) Initializes a new instance of the
DistributedApplicationFactory class. Methods6
Section titled MethodsCreateHttpClient(string, string?)HttpClient Creates an instance of
Http.HttpClient that is configured to route requests to the specified resource and endpoint. DisposevirtualPerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
DisposeAsyncvirtualValueTask Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
GetConnectionString(string)ValueTask<string?> Gets the connection string for the specified resource.
GetEndpoint(string, string?)Uri Gets the endpoint for the specified resource.
StartAsync(CancellationToken)Task Starts the application.