Partager via


WebApplicationFactory<TEntryPoint>.WithWebHostBuilder Méthode

Définition

Crée un avec WebApplicationFactory<TEntryPoint> un IWebHostBuilder qui est davantage personnalisé par 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)

Paramètres

configuration
Action<IWebHostBuilder>

Action<T> permettant de configurer le IWebHostBuilder.

Retours

Nouveau WebApplicationFactory<TEntryPoint>.

S’applique à