ServiceDescriptor.Scoped メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| Scoped(Type, Func<IServiceProvider,Object>) |
指定した |
| Scoped(Type, Type) |
指定した |
| Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>) |
指定した |
| Scoped<TService,TImplementation>() |
指定した |
| Scoped<TService>(Func<IServiceProvider,TService>) |
指定した |
Scoped(Type, Func<IServiceProvider,Object>)
指定したservice、implementationFactory、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Type ^ service, Func<IServiceProvider ^, System::Object ^> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped(Type service, Func<IServiceProvider,object> implementationFactory);
static member Scoped : Type * Func<IServiceProvider, obj> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function Scoped (service As Type, implementationFactory As Func(Of IServiceProvider, Object)) As ServiceDescriptor
パラメーター
- service
- Type
サービスの種類。
- implementationFactory
- Func<IServiceProvider,Object>
サービス実装の新しいインスタンスを作成するファクトリ。
返品
ServiceDescriptorの新しいインスタンス。
適用対象
Scoped(Type, Type)
指定したserviceとimplementationTypeとScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Type ^ service, Type ^ implementationType);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped(Type service, Type implementationType);
static member Scoped : Type * Type -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function Scoped (service As Type, implementationType As Type) As ServiceDescriptor
パラメーター
- service
- Type
サービスの種類。
- implementationType
- Type
実装の型。
返品
ServiceDescriptorの新しいインスタンス。
適用対象
Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>)
指定したTService、TImplementation、implementationFactory、およびScoped有効期間を使用して、ServiceDescriptorのインスタンスを作成します。
public:
generic <typename TService, typename TImplementation>
where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Func<IServiceProvider ^, TImplementation> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
static member Scoped : Func<IServiceProvider, #'Service> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function Scoped(Of TService As Class, TImplementation As Class) (implementationFactory As Func(Of IServiceProvider, TImplementation)) As ServiceDescriptor
型パラメーター
- TService
サービスの種類。
- TImplementation
実装の型。
パラメーター
- implementationFactory
- Func<IServiceProvider,TImplementation>
サービス実装の新しいインスタンスを作成するファクトリ。
返品
ServiceDescriptorの新しいインスタンス。
適用対象
Scoped<TService,TImplementation>()
指定したTService、TImplementation、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。
public:
generic <typename TService, typename TImplementation>
where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped();
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped<TService,TImplementation>() where TService : class where TImplementation : class, TService;
static member Scoped : unit -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function Scoped(Of TService As Class, TImplementation As Class) () As ServiceDescriptor
型パラメーター
- TService
サービスの種類。
- TImplementation
実装の型。
返品
ServiceDescriptorの新しいインスタンス。
適用対象
Scoped<TService>(Func<IServiceProvider,TService>)
指定したTService、implementationFactory、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。
public:
generic <typename TService>
where TService : class static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Func<IServiceProvider ^, TService> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped<TService>(Func<IServiceProvider,TService> implementationFactory) where TService : class;
static member Scoped : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function Scoped(Of TService As Class) (implementationFactory As Func(Of IServiceProvider, TService)) As ServiceDescriptor
型パラメーター
- TService
サービスの種類。
パラメーター
- implementationFactory
- Func<IServiceProvider,TService>
サービス実装の新しいインスタンスを作成するファクトリ。
返品
ServiceDescriptorの新しいインスタンス。