ServiceDescriptor クラス

定義

サービスの種類、実装、有効期間を持つサービスについて説明します。

public ref class ServiceDescriptor
public class ServiceDescriptor
type ServiceDescriptor = class
Public Class ServiceDescriptor
継承
ServiceDescriptor

コンストラクター

名前 説明
ServiceDescriptor(Type, Func<IServiceProvider,Object>, ServiceLifetime)

指定したServiceDescriptorを使用して、factoryの新しいインスタンスを初期化します。

ServiceDescriptor(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime)

指定したServiceDescriptorを使用して、factoryの新しいインスタンスを初期化します。

ServiceDescriptor(Type, Object, Object)

指定したinstanceSingletonとして使用して、ServiceDescriptorの新しいインスタンスを初期化します。

ServiceDescriptor(Type, Object, Type, ServiceLifetime)

指定したServiceDescriptorを使用して、implementationTypeの新しいインスタンスを初期化します。

ServiceDescriptor(Type, Object)

指定したinstanceSingletonとして使用して、ServiceDescriptorの新しいインスタンスを初期化します。

ServiceDescriptor(Type, Type, ServiceLifetime)

指定したServiceDescriptorを使用して、implementationTypeの新しいインスタンスを初期化します。

プロパティ

名前 説明
ImplementationFactory

サービス インスタンスの作成に使用するファクトリを取得するか、IsKeyedServicetrueされている場合はnullを返します。

ImplementationInstance

サービスを実装するインスタンスを取得するか、IsKeyedServicetrue場合はnullを返します。

ImplementationType

サービスを実装するTypeを取得するか、IsKeyedServicetrue場合はnullを返します。

IsKeyedService

サービスがキー付きサービスかどうかを示します。

KeyedImplementationFactory

キー付きサービス インスタンスの作成に使用するファクトリを取得するか、IsKeyedServicefalse場合はInvalidOperationExceptionをスローします。

KeyedImplementationInstance

サービスを実装するインスタンスを取得するか、IsKeyedServicefalseされている場合はInvalidOperationExceptionをスローします。

KeyedImplementationType

サービスを実装するTypeを取得するか、IsKeyedServicefalseされている場合はInvalidOperationExceptionをスローします。

Lifetime

サービスの ServiceLifetime を取得します。

ServiceKey

該当する場合は、サービスのキーを取得します。

ServiceType

サービスの Type を取得します。

メソッド

名前 説明
Describe(Type, Func<IServiceProvider,Object>, ServiceLifetime)

指定したserviceTypeimplementationFactory、およびlifetimeを使用して、ServiceDescriptorのインスタンスを作成します。

Describe(Type, Type, ServiceLifetime)

指定したserviceTypeimplementationType、およびlifetimeを使用して、ServiceDescriptorのインスタンスを作成します。

DescribeKeyed(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime)

指定したserviceTypeimplementationFactory、およびlifetimeを使用して、ServiceDescriptorのインスタンスを作成します。

DescribeKeyed(Type, Object, Type, ServiceLifetime)

指定したserviceTypeimplementationType、およびlifetimeを使用して、ServiceDescriptorのインスタンスを作成します。

Equals(Object)

指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
KeyedScoped(Type, Object, Func<IServiceProvider,Object,Object>)

指定したserviceimplementationFactory、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedScoped(Type, Object, Type)

指定したserviceimplementationTypeScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedScoped<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびScoped有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedScoped<TService,TImplementation>(Object)

指定したTServiceTImplementation、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedScoped<TService>(Object, Func<IServiceProvider,Object,TService>)

指定したTServiceimplementationFactory、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton(Type, Object, Func<IServiceProvider,Object,Object>)

指定したserviceTypeimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton(Type, Object, Object)

指定したserviceTypeimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton(Type, Object, Type)

指定したserviceimplementationTypeSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびSingleton有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService,TImplementation>(Object)

指定したTServiceTImplementation、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService>(Object, Func<IServiceProvider,Object,TService>)

指定したTServiceimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService>(Object, TService)

指定したTServiceimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedTransient(Type, Object, Func<IServiceProvider,Object,Object>)

指定したserviceimplementationFactory、およびTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedTransient(Type, Object, Type)

指定したserviceimplementationTypeTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedTransient<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびTransient有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedTransient<TService,TImplementation>(Object)

指定したTServiceTImplementation、およびTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedTransient<TService>(Object, Func<IServiceProvider,Object,TService>)

指定したTServiceimplementationFactory、およびTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
Scoped(Type, Func<IServiceProvider,Object>)

指定したserviceimplementationFactory、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Scoped(Type, Type)

指定したserviceimplementationTypeScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Scoped<TService,TImplementation>()

指定したTServiceTImplementation、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびScoped有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Scoped<TService>(Func<IServiceProvider,TService>)

指定したTServiceimplementationFactory、およびScopedの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton(Type, Func<IServiceProvider,Object>)

指定したserviceTypeimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton(Type, Object)

指定したserviceTypeimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton(Type, Type)

指定したserviceimplementationTypeSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton<TService,TImplementation>()

指定したTServiceTImplementation、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびSingleton有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton<TService>(Func<IServiceProvider,TService>)

指定したTServiceimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Singleton<TService>(TService)

指定したTServiceimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

ToString()

現在のオブジェクトを表す文字列を返します。

Transient(Type, Func<IServiceProvider,Object>)

指定したserviceimplementationFactory、およびTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Transient(Type, Type)

指定したserviceimplementationTypeTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Transient<TService,TImplementation>()

指定したTServiceTImplementation、およびTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Transient<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびTransient有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

Transient<TService>(Func<IServiceProvider,TService>)

指定したTServiceimplementationFactory、およびTransientの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

適用対象