ServiceProviderServiceExtensions.CreateAsyncScope Method
Definition
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.
Overloads
CreateAsyncScope(IServiceScopeFactory) |
Creates a new AsyncServiceScope that can be used to resolve scoped services. |
CreateAsyncScope(IServiceProvider) |
Creates a new AsyncServiceScope that can be used to resolve scoped services. |
CreateAsyncScope(IServiceScopeFactory)
Creates a new AsyncServiceScope that can be used to resolve scoped services.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::AsyncServiceScope CreateAsyncScope(Microsoft::Extensions::DependencyInjection::IServiceScopeFactory ^ serviceScopeFactory);
public static Microsoft.Extensions.DependencyInjection.AsyncServiceScope CreateAsyncScope (this Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory);
static member CreateAsyncScope : Microsoft.Extensions.DependencyInjection.IServiceScopeFactory -> Microsoft.Extensions.DependencyInjection.AsyncServiceScope
<Extension()>
Public Function CreateAsyncScope (serviceScopeFactory As IServiceScopeFactory) As AsyncServiceScope
Parameters
- serviceScopeFactory
- IServiceScopeFactory
The IServiceScopeFactory to create the scope from.
Returns
An AsyncServiceScope that can be used to resolve scoped services.
Applies to
CreateAsyncScope(IServiceProvider)
Creates a new AsyncServiceScope that can be used to resolve scoped services.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::AsyncServiceScope CreateAsyncScope(IServiceProvider ^ provider);
public static Microsoft.Extensions.DependencyInjection.AsyncServiceScope CreateAsyncScope (this IServiceProvider provider);
static member CreateAsyncScope : IServiceProvider -> Microsoft.Extensions.DependencyInjection.AsyncServiceScope
<Extension()>
Public Function CreateAsyncScope (provider As IServiceProvider) As AsyncServiceScope
Parameters
- provider
- IServiceProvider
The IServiceProvider to create the scope from.
Returns
An AsyncServiceScope that can be used to resolve scoped services.