private ReflectionComposablePartDefinition CreateEmptyDefinition(Type type, ConstructorInfo constructor, IDictionary <string, object> metadata, ICompositionElement origin) { return((ReflectionComposablePartDefinition)ReflectionModelServices.CreatePartDefinition( (type != null) ? type.AsLazy() : null, false, Enumerable.Empty <ImportDefinition>().AsLazy(), Enumerable.Empty <ExportDefinition>().AsLazy(), metadata.AsLazy(), origin)); }
private ReflectionComposablePartDefinition CreateReflectionPartDefinition( Lazy <Type> partType, bool requiresDisposal, Func <IEnumerable <ImportDefinition> > imports, Func <IEnumerable <ExportDefinition> > exports, IDictionary <string, object> metadata, ICompositionElement origin) { return((ReflectionComposablePartDefinition)ReflectionModelServices.CreatePartDefinition(partType, requiresDisposal, new Lazy <IEnumerable <ImportDefinition> >(imports, false), new Lazy <IEnumerable <ExportDefinition> >(exports, false), metadata.AsLazy(), origin)); }