Пример #1
0
 private static object CreateStronglyTypedExportFactoryOfTM <T, M>(Export export)
 {
     return(new ExportFactory <T, M>(
                () => ExportServices.GetExportLifetimeContextFromExport <T>(export),
                AttributedModelServices.GetMetadataView <M>(export.Metadata)));
 }
        private static object CreateStronglyTypedExportFactoryOfTM <T, M>(Export export, ConstructorInfo constructor)
        {
            Func <Tuple <T, Action> > exportLifetimeContextCreator = () => ExportServices.GetExportLifetimeContextFromExport <T>(export);

            return(constructor.Invoke(new object[] { exportLifetimeContextCreator, AttributedModelServices.GetMetadataView <M>(export.Metadata) }));
        }
Пример #3
0
 private static object CreateStronglyTypedExportFactoryOfT <T>(Export export)
 {
     return(new ExportFactory <T>(
                () => ExportServices.GetExportLifetimeContextFromExport <T>(export)));
 }
        private static object CreateStronglyTypedExportFactoryOfT <T>(Export export, ConstructorInfo constructor)
        {
            Func <Tuple <T, Action> > exportLifetimeContextCreator = () => ExportServices.GetExportLifetimeContextFromExport <T>(export);

            return(constructor.Invoke(new object[] { exportLifetimeContextCreator }));
        }