示例#1
0
 public DescriptionClass(DllReader test, Type type)
 {
     _mainType    = type;
     _subClasses  = SortListSubClass(test.GetSubClassAndI(_mainType), test);
     _nestedClass = type.GetNestedTypes().ToList();
     _property    = type.GetProperties().ToList();
     _field       = SortListFi(type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).ToList());
     _method      = SortListMi(type.GetMethods().ToList());
 }
 public DescriptionClass(DllReader test, Type type)
 {
     _mainType = type;
     _subClasses = SortListSubClass(test.GetSubClassAndI(_mainType), test);
     _nestedClass = type.GetNestedTypes().ToList();
     _property = type.GetProperties().ToList();
     _field = SortListFi(type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).ToList());
     _method = SortListMi(type.GetMethods().ToList());
 }
示例#3
0
//triage de liste subClasse pour enlever les classes déjà utilisé par les classes mères.
        public List <Type> SortListSubClass(List <Type> sClass, DllReader test)
        {
            List <Type> lIndex = new List <Type>();

            foreach (Type type in sClass)
            {
                foreach (Type t in test.GetSubClassAndI(type))
                {
                    if (sClass.Contains(t))
                    {
                        lIndex.Add(t);
                    }
                }
            }
            foreach (Type t in lIndex)
            {
                sClass.Remove(t);
            }
            return(sClass);
        }
 //triage de liste subClasse pour enlever les classes déjà utilisé par les classes mères.
 public List<Type> SortListSubClass(List<Type> sClass, DllReader test)
 {
     List<Type> lIndex = new List<Type>();
       foreach (Type type in sClass)
       {
       foreach (Type t in test.GetSubClassAndI(type))
       {
           if (sClass.Contains(t))
               lIndex.Add(t);
       }
       }
       foreach (Type t in lIndex)
       sClass.Remove(t);
       return sClass;
 }