Zdieľať cez


ServiceProviderServiceExtensions.CreateAsyncScope Method

Definition

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)

Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs

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)

Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs
Source:
ServiceProviderServiceExtensions.cs

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.

Applies to