共用方式為


ServiceProviderServiceExtensions.CreateAsyncScope 方法

定義

多載

CreateAsyncScope(IServiceScopeFactory)

建立可用來解析已設定範圍服務的新 AsyncServiceScope

CreateAsyncScope(IServiceProvider)

建立可用來解析已設定範圍服務的新 AsyncServiceScope

CreateAsyncScope(IServiceScopeFactory)

來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs

建立可用來解析已設定範圍服務的新 AsyncServiceScope

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

參數

serviceScopeFactory
IServiceScopeFactory

要從中建立範圍的 IServiceScopeFactory

傳回

AsyncServiceScope,可用來解析範圍服務。

適用於

CreateAsyncScope(IServiceProvider)

來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs
來源:
ServiceProviderServiceExtensions.cs

建立可用來解析已設定範圍服務的新 AsyncServiceScope

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

參數

provider
IServiceProvider

要從中建立範圍的 IServiceProvider

傳回

AsyncServiceScope,可用來解析範圍服務。

適用於