WebApplicationFactory<TEntryPoint>.WithWebHostBuilder Metodo

Definizione

Crea un nuovo oggetto con un IWebHostBuilder oggetto WebApplicationFactory<TEntryPoint> ulteriormente personalizzato da 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)

Parametri

configuration
Action<IWebHostBuilder>

Oggetto Action<T> per la configurazione di IWebHostBuilder.

Restituisce

Nuovo oggetto WebApplicationFactory<TEntryPoint>.

Si applica a