示例#1
0
 public static ComposableCatalog AddInstance <T1, T2, TResult>(this ComposableCatalog composableCatalog, Func <T1, T2, TResult> factory)
 => composableCatalog.AddType(MefFactoryGenerator.GetExportType(factory));
示例#2
0
 public static ComposableCatalog AddInstance <T>(this ComposableCatalog composableCatalog, Func <T> factory)
 {
     return(composableCatalog.AddType(MefFactoryGenerator.GetExportType(factory)));
 }