WebApplicationFactory<TEntryPoint>.WithWebHostBuilder Metodo

Definizione

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

WebApplicationFactory<TEntryPoint>

Nuovo oggetto WebApplicationFactory<TEntryPoint>.

Si applica a