Dil

ActivatorUtilities.CreateFactory Yöntem

Tanım

Aşırı Yüklemeler

Name Description
CreateFactory(Type, Type[])

Doğrudan ve/veya öğesinden sağlanan oluşturucu bağımsız değişkenleriyle bir tür örneği oluşturacak bir IServiceProvidertemsilci oluşturur.

CreateFactory<T>(Type[])

Doğrudan ve/veya öğesinden sağlanan oluşturucu bağımsız değişkenleriyle bir tür örneği oluşturacak bir IServiceProvidertemsilci oluşturur.

CreateFactory(Type, Type[])

Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs

Doğrudan ve/veya öğesinden sağlanan oluşturucu bağımsız değişkenleriyle bir tür örneği oluşturacak bir IServiceProvidertemsilci oluşturur.

public:
 static Microsoft::Extensions::DependencyInjection::ObjectFactory ^ CreateFactory(Type ^ instanceType, cli::array <Type ^> ^ argumentTypes);
public static Microsoft.Extensions.DependencyInjection.ObjectFactory CreateFactory(Type instanceType, Type[] argumentTypes);
static member CreateFactory : Type * Type[] -> Microsoft.Extensions.DependencyInjection.ObjectFactory
Public Shared Function CreateFactory (instanceType As Type, argumentTypes As Type()) As ObjectFactory

Parametreler

instanceType
Type

Etkinleştirecek tür.

argumentTypes
Type[]

Döndürülen işleve ikinci parametresi olarak geçirilecek sırasıyla nesne türleri.

Döndürülenler

bir ve bağımsız değişken dizisini kullanarak IServiceProvider instanceType örneği oluşturacak ve argumentType'larda tanımlanan türlerle eşleşen nesneleri içeren bir fabrika.

Şunlara uygulanır

CreateFactory<T>(Type[])

Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs
Kaynak:
ActivatorUtilities.cs

Doğrudan ve/veya öğesinden sağlanan oluşturucu bağımsız değişkenleriyle bir tür örneği oluşturacak bir IServiceProvidertemsilci oluşturur.

public:
generic <typename T>
 static Microsoft::Extensions::DependencyInjection::ObjectFactory<T> ^ CreateFactory(cli::array <Type ^> ^ argumentTypes);
public static Microsoft.Extensions.DependencyInjection.ObjectFactory<T> CreateFactory<T>(Type[] argumentTypes);
static member CreateFactory : Type[] -> Microsoft.Extensions.DependencyInjection.ObjectFactory<'T>
Public Shared Function CreateFactory(Of T) (argumentTypes As Type()) As ObjectFactory(Of T)

Tür Parametreleri

T

Etkinleştirecek tür.

Parametreler

argumentTypes
Type[]

Döndürülen işleve ikinci parametresi olarak geçirilecek sırasıyla nesne türleri.

Döndürülenler

içinde tanımlanan argumentTypestürlere uyan nesneleri içeren bir IServiceProvider ve bağımsız değişken dizisi kullanarak tür T örneği oluşturacak bir fabrika.

Şunlara uygulanır