Exemple #1
0
        static Dictionary <Type, List <EnumItem> > Init()
        {
            Dictionary <Type, List <EnumItem> > enums = new Dictionary <Type, List <EnumItem> >();
            var assemblies = AssemberFinder.FindAll();

            assemblies.ToList().ForEach(ass => {
                ass.GetTypes().Where(o => o.IsEnum).ToList().ForEach(
                    item =>
                    enums.Add(item, ConvertEnumToItem(item)));
            });
            return(enums);
        }
Exemple #2
0
 protected override Type[] FindAllItems()
 {
     //Projects each element of a sequence to an System.Collections.Generic.IEnumerable`1
     //and flattens the resulting sequences into one sequence.
     return(_assemblyFinder.FindAll().SelectMany(x => x.GetTypes()).ToArray());//返回数组
 }
 protected override Type[] FindAllItems()
 {
     return(_assemblyFinder.FindAll().SelectMany(o => o.GetTypes()).ToArray());
 }