// Read all Fields via reflection.
ArrayList fieldList = new ArrayList();
FieldInfo[] tfields = type.GetFields (BindingFlags.Instance | BindingFlags.Public);
-#if TARGET_JVM
- // This statement ensures fields are ordered starting from the base type.
- for (int ti=0; ti<typeList.Count; ti++) {
- for (int i=0; i<tfields.Length; i++) {
- FieldInfo field = tfields[i];
- if (field.DeclaringType == typeList[ti])
- fieldList.Add (field);
- }
- }
-#else
currentType = null;
int currentIndex = 0;
foreach (FieldInfo field in tfields)
}
fieldList.Insert(currentIndex++, field);
}
-#endif
// Read all Properties via reflection.
ArrayList propList = new ArrayList();
PropertyInfo[] tprops = type.GetProperties (BindingFlags.Instance | BindingFlags.Public);
-#if TARGET_JVM
- // This statement ensures properties are ordered starting from the base type.
- for (int ti=0; ti<typeList.Count; ti++) {
- for (int i=0; i<tprops.Length; i++) {
- PropertyInfo prop = tprops[i];
- if (!prop.CanRead) continue;
- if (prop.GetIndexParameters().Length > 0) continue;
- if (prop.DeclaringType == typeList[ti])
- propList.Add (prop);
- }
- }
-#else
currentType = null;
currentIndex = 0;
foreach (PropertyInfo prop in tprops)
if (prop.GetIndexParameters().Length > 0) continue;
propList.Insert(currentIndex++, prop);
}
-#endif
var members = new List<XmlReflectionMember>();
int fieldIndex=0;
int propIndex=0;