WebApplicationFactory<TEntryPoint>.WithWebHostBuilder Método

Definição

Cria um novo WebApplicationFactory<TEntryPoint> com um IWebHostBuilder que é personalizado ainda mais por configuration.

public:
 Microsoft::AspNetCore::Mvc::Testing::WebApplicationFactory<TEntryPoint> ^ WithWebHostBuilder(Action<Microsoft::AspNetCore::Hosting::IWebHostBuilder ^> ^ configuration);
public Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory<TEntryPoint> WithWebHostBuilder (Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> configuration);
member this.WithWebHostBuilder : Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> -> Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory<'EntryPoint (requires 'EntryPoint : null)>
Public Function WithWebHostBuilder (configuration As Action(Of IWebHostBuilder)) As WebApplicationFactory(Of TEntryPoint)

Parâmetros

configuration
Action<IWebHostBuilder>

Um Action<T> para configurar o IWebHostBuilder.

Retornos

Um novo WebApplicationFactory<TEntryPoint>.

Aplica-se a