Share via


DistributedApplicationTestingBuilder.CreateAsync Method

Definition

Overloads

CreateAsync(Type, CancellationToken)

Creates a new instance of DistributedApplicationTestingBuilder.

CreateAsync(Type, String[], CancellationToken)

Creates a new instance of DistributedApplicationTestingBuilder.

CreateAsync(Type, String[], Action<DistributedApplicationOptions,HostApplicationBuilderSettings>, CancellationToken)

Creates a new instance of DistributedApplicationTestingBuilder.

CreateAsync<TEntryPoint>(CancellationToken)

Creates a new instance of DistributedApplicationTestingBuilder.

CreateAsync<TEntryPoint>(String[], CancellationToken)

Creates a new instance of DistributedApplicationTestingBuilder.

CreateAsync<TEntryPoint>(String[], Action<DistributedApplicationOptions,HostApplicationBuilderSettings>, CancellationToken)

Creates a new instance of DistributedApplicationTestingBuilder.

CreateAsync(Type, CancellationToken)

Source:
DistributedApplicationTestingBuilder.cs
Source:
DistributedApplicationTestingBuilder.cs

Creates a new instance of DistributedApplicationTestingBuilder.

public static System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> CreateAsync (Type entryPoint, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder>
Public Shared Function CreateAsync (entryPoint As Type, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDistributedApplicationTestingBuilder)

Parameters

entryPoint
Type

A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.

cancellationToken
CancellationToken

The CancellationToken.

Returns

A new instance of DistributedApplicationTestingBuilder.

Applies to

CreateAsync(Type, String[], CancellationToken)

Source:
DistributedApplicationTestingBuilder.cs
Source:
DistributedApplicationTestingBuilder.cs

Creates a new instance of DistributedApplicationTestingBuilder.

public static System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> CreateAsync (Type entryPoint, string[] args, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : Type * string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder>
Public Shared Function CreateAsync (entryPoint As Type, args As String(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDistributedApplicationTestingBuilder)

Parameters

entryPoint
Type

A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.

args
String[]

The command line arguments to pass to the entry point.

cancellationToken
CancellationToken

The CancellationToken.

Returns

A new instance of DistributedApplicationTestingBuilder.

Applies to

CreateAsync(Type, String[], Action<DistributedApplicationOptions,HostApplicationBuilderSettings>, CancellationToken)

Source:
DistributedApplicationTestingBuilder.cs
Source:
DistributedApplicationTestingBuilder.cs

Creates a new instance of DistributedApplicationTestingBuilder.

public static System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> CreateAsync (Type entryPoint, string[] args, Action<Aspire.Hosting.DistributedApplicationOptions,Microsoft.Extensions.Hosting.HostApplicationBuilderSettings> configureBuilder, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : Type * string[] * Action<Aspire.Hosting.DistributedApplicationOptions, Microsoft.Extensions.Hosting.HostApplicationBuilderSettings> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder>
Public Shared Function CreateAsync (entryPoint As Type, args As String(), configureBuilder As Action(Of DistributedApplicationOptions, HostApplicationBuilderSettings), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDistributedApplicationTestingBuilder)

Parameters

entryPoint
Type

A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.

args
String[]

The command line arguments to pass to the entry point.

configureBuilder
Action<DistributedApplicationOptions,HostApplicationBuilderSettings>

The delegate used to configure the builder.

cancellationToken
CancellationToken

The CancellationToken.

Returns

A new instance of DistributedApplicationTestingBuilder.

Applies to

CreateAsync<TEntryPoint>(CancellationToken)

Source:
DistributedApplicationTestingBuilder.cs
Source:
DistributedApplicationTestingBuilder.cs

Creates a new instance of DistributedApplicationTestingBuilder.

public static System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint> (System.Threading.CancellationToken cancellationToken = default) where TEntryPoint : class;
static member CreateAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> (requires 'EntryPoint : null)
Public Shared Function CreateAsync(Of TEntryPoint As Class) (Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDistributedApplicationTestingBuilder)

Type Parameters

TEntryPoint

A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.

Parameters

cancellationToken
CancellationToken

The CancellationToken.

Returns

A new instance of DistributedApplicationTestingBuilder.

Applies to

CreateAsync<TEntryPoint>(String[], CancellationToken)

Source:
DistributedApplicationTestingBuilder.cs
Source:
DistributedApplicationTestingBuilder.cs

Creates a new instance of DistributedApplicationTestingBuilder.

public static System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint> (string[] args, System.Threading.CancellationToken cancellationToken = default) where TEntryPoint : class;
static member CreateAsync : string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> (requires 'EntryPoint : null)
Public Shared Function CreateAsync(Of TEntryPoint As Class) (args As String(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDistributedApplicationTestingBuilder)

Type Parameters

TEntryPoint

A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.

Parameters

args
String[]

The command line arguments to pass to the entry point.

cancellationToken
CancellationToken

The CancellationToken.

Returns

A new instance of DistributedApplicationTestingBuilder.

Applies to

CreateAsync<TEntryPoint>(String[], Action<DistributedApplicationOptions,HostApplicationBuilderSettings>, CancellationToken)

Source:
DistributedApplicationTestingBuilder.cs
Source:
DistributedApplicationTestingBuilder.cs

Creates a new instance of DistributedApplicationTestingBuilder.

public static System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint> (string[] args, Action<Aspire.Hosting.DistributedApplicationOptions,Microsoft.Extensions.Hosting.HostApplicationBuilderSettings> configureBuilder, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : string[] * Action<Aspire.Hosting.DistributedApplicationOptions, Microsoft.Extensions.Hosting.HostApplicationBuilderSettings> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder>
Public Shared Function CreateAsync(Of TEntryPoint) (args As String(), configureBuilder As Action(Of DistributedApplicationOptions, HostApplicationBuilderSettings), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDistributedApplicationTestingBuilder)

Type Parameters

TEntryPoint

A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.

Parameters

args
String[]

The command line arguments to pass to the entry point.

configureBuilder
Action<DistributedApplicationOptions,HostApplicationBuilderSettings>

The delegate used to configure the builder.

cancellationToken
CancellationToken

The CancellationToken.

Returns

A new instance of DistributedApplicationTestingBuilder.

Applies to