Update ServiceCollectionContainerBuilderExtensions.cs (#615)
This commit is contained in:
Родитель
c81de4e885
Коммит
a0467de767
|
@ -11,10 +11,10 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
public static class ServiceCollectionContainerBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates an <see cref="IServiceProvider"/> containing services from the provided <see cref="IServiceCollection"/>.
|
||||
/// Creates a <see cref="ServiceProvider"/> containing services from the provided <see cref="IServiceCollection"/>.
|
||||
/// </summary>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/> containing service descriptors.</param>
|
||||
/// <returns>The <see cref="IServiceProvider"/>.</returns>
|
||||
/// <returns>The <see cref="ServiceProvider"/>.</returns>
|
||||
|
||||
public static ServiceProvider BuildServiceProvider(this IServiceCollection services)
|
||||
{
|
||||
|
@ -22,28 +22,28 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="IServiceProvider"/> containing services from the provided <see cref="IServiceCollection"/>
|
||||
/// Creates a <see cref="ServiceProvider"/> containing services from the provided <see cref="IServiceCollection"/>
|
||||
/// optionaly enabling scope validation.
|
||||
/// </summary>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/> containing service descriptors.</param>
|
||||
/// <param name="validateScopes">
|
||||
/// <c>true</c> to perform check verifying that scoped services never gets resolved from root provider; otherwise <c>false</c>.
|
||||
/// </param>
|
||||
/// <returns>The <see cref="IServiceProvider"/>.</returns>
|
||||
/// <returns>The <see cref="ServiceProvider"/>.</returns>
|
||||
public static ServiceProvider BuildServiceProvider(this IServiceCollection services, bool validateScopes)
|
||||
{
|
||||
return services.BuildServiceProvider(new ServiceProviderOptions { ValidateScopes = validateScopes });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="IServiceProvider"/> containing services from the provided <see cref="IServiceCollection"/>
|
||||
/// Creates a <see cref="ServiceProvider"/> containing services from the provided <see cref="IServiceCollection"/>
|
||||
/// optionaly enabling scope validation.
|
||||
/// </summary>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/> containing service descriptors.</param>
|
||||
/// <param name="options">
|
||||
/// Configures various service provider behaviors.
|
||||
/// </param>
|
||||
/// <returns>The <see cref="IServiceProvider"/>.</returns>
|
||||
/// <returns>The <see cref="ServiceProvider"/>.</returns>
|
||||
public static ServiceProvider BuildServiceProvider(this IServiceCollection services, ServiceProviderOptions options)
|
||||
{
|
||||
if (services == null)
|
||||
|
|
Загрузка…
Ссылка в новой задаче