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.

適用於