ServiceProviderServiceExtensions.CreateScope(IServiceProvider) Método

Definición

Crea una instancia de IServiceScope que se puede usar para resolver los servicios con ámbito.Creates a new IServiceScope that can be used to resolve scoped services.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceScope ^ CreateScope(IServiceProvider ^ provider);
public static Microsoft.Extensions.DependencyInjection.IServiceScope CreateScope (this IServiceProvider provider);
static member CreateScope : IServiceProvider -> Microsoft.Extensions.DependencyInjection.IServiceScope
<Extension()>
Public Function CreateScope (provider As IServiceProvider) As IServiceScope

Parámetros

provider
IServiceProvider

La interfaz IServiceProvider desde la que se va a crear el ámbito.The IServiceProvider to create the scope from.

Devoluciones

IServiceScope

Una instancia de IServiceScope que se puede usar para resolver los servicios con ámbito.A IServiceScope that can be used to resolve scoped services.

Se aplica a