WebApplicationFactory<TEntryPoint>.WithWebHostBuilder Metoda

Definicja

Tworzy nowy WebApplicationFactory<TEntryPoint> element z elementem, który jest jeszcze bardziej dostosowany przez usługę IWebHostBuilderconfiguration.

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)

Parametry

configuration
Action<IWebHostBuilder>

Element do Action<T> skonfigurowania elementu IWebHostBuilder.

Zwraca

WebApplicationFactory<TEntryPoint>Nowy element .

Dotyczy