зеркало из
1
0
Форкнуть 0

Update ServiceCollectionContainerBuilderExtensions.cs (#615)

This commit is contained in:
Rick Anderson 2017-12-06 06:23:05 -10:00 коммит произвёл Pavel Krymets
Родитель c81de4e885
Коммит a0467de767
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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)