Exemple #1
0
        private static List <ExportDefinition> CreateExports(Type type)
        {
            List <ExportDefinition> exports = new List <ExportDefinition>();

            foreach (PropertyInfo property in type.GetProperties())
            {
                exports.Add(ReflectionModelServices.CreateExportDefinition(new LazyMemberInfo(property), "Contract", new Lazy <IDictionary <string, object> >(() => null, false), new TypeOrigin(type)));
            }

            return(exports);
        }
Exemple #2
0
 private static ReflectionMemberExportDefinition CreateReflectionExportDefinition(LazyMemberInfo exportMember, string contractname, IDictionary <string, object> metadata, ICompositionElement origin)
 {
     return((ReflectionMemberExportDefinition)ReflectionModelServices.CreateExportDefinition(
                exportMember, contractname, CreateLazyMetadata(metadata), origin));
 }