ExportFactory<T,TMetadata>(Func<Tuple<T,Action>>, TMetadata) 构造函数

定义

初始化 ExportFactory<T,TMetadata> 类的新实例。Initializes a new instance of the ExportFactory<T,TMetadata> class.

public:
 ExportFactory(Func<Tuple<T, Action ^> ^> ^ exportCreator, TMetadata metadata);
public ExportFactory (Func<Tuple<T,Action>> exportCreator, TMetadata metadata);
new System.Composition.ExportFactory<'T, 'Metadata> : Func<'T * Action> * 'Metadata -> System.Composition.ExportFactory<'T, 'Metadata>
Public Sub New (exportCreator As Func(Of Tuple(Of T, Action)), metadata As TMetadata)

参数

exportCreator
Func<Tuple<T,Action>>

一个返回 Item1 中的导出值的函数和一个在 Item2 中释放它的 ActionA function that returns the exported value in Item1 and an Action that releases it in Item2.

metadata
TMetadata

要附加到所创建部件的元数据。The metadata to attach to the created parts.

适用于