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()); }
//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; }