Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

WebHostBuilderExtensions.ConfigureTestServices Method

Definition

Namespace:
Microsoft.AspNetCore.TestHost
Assembly:
Microsoft.AspNetCore.TestHost.dll
Package:
Microsoft.AspNetCore.TestHost v10.0.0
Package:
Microsoft.AspNetCore.TestHost v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.TestHost v2.1.0
Package:
Microsoft.AspNetCore.TestHost v2.2.0
Package:
Microsoft.AspNetCore.TestHost v3.0.3
Package:
Microsoft.AspNetCore.TestHost v3.1.18
Package:
Microsoft.AspNetCore.TestHost v5.0.9
Package:
Microsoft.AspNetCore.TestHost v6.0.6
Package:
Microsoft.AspNetCore.TestHost v7.0.5
Package:
Microsoft.AspNetCore.TestHost v8.0.19
Package:
Microsoft.AspNetCore.TestHost v9.0.8
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Configures the IWebHostBuilder instance with the services provided in servicesConfiguration.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureTestServices(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ webHostBuilder, Action<Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ servicesConfiguration);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureTestServices(this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder, Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> servicesConfiguration);
static member ConfigureTestServices : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureTestServices (webHostBuilder As IWebHostBuilder, servicesConfiguration As Action(Of IServiceCollection)) As IWebHostBuilder

Parameters

webHostBuilder
IWebHostBuilder

The IWebHostBuilder.

servicesConfiguration
Action<IServiceCollection>

An Action that registers services onto the IServiceCollection.

Returns

The IWebHostBuilder.

Applies to


Feedback

Was this page helpful?