WebApplicationFactory<TEntryPoint>.WithWebHostBuilder Yöntem

Tanım

ile daha da özelleştirilmiş configurationyeni WebApplicationFactory<TEntryPoint> bir IWebHostBuilder oluşturur.

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)

Parametreler

configuration
Action<IWebHostBuilder>

yapılandırmak IWebHostBuilderiçin bir Action<T> .

Döndürülenler

Yeni WebApplicationFactory<TEntryPoint>bir .

Şunlara uygulanır