private void ParseDoc() { PropertyInfo[] fields = TypeContext.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); foreach (PropertyInfo field in fields) { var doc = new PropertyDoc(); doc.Label = field.Name; string propertyName = ""; if (TypeHelper.IsExist(field.PropertyType)) { propertyName = field.Name; doc.Comment = this.GetComment(field.Name); } else { var _type = Types.SingleOrDefault <Type>(e => e.Name.Trim() == field.Name.Trim()); if (_type != null) { propertyName = field.Name + "_ID"; doc.Comment = this.GetComment(field.Name); } else { propertyName = field.Name; doc.Comment = this.GetComment(field.Name); } } doc.PropertyName = propertyName; if (propertyName != "ID" || propertyName != "AddDate" || propertyName != "UpdateDate") { this._result.Add(doc); } } fields = TypeContext.BaseType.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); foreach (PropertyInfo field in fields) { var doc = new PropertyDoc(); doc.PropertyName = field.Name; doc.Label = field.Name; doc.Comment = this.GetComment(field.Name); this._result.Add(doc); } }
private void ParseDoc() { PropertyInfo[] fields = TypeContext.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); foreach (PropertyInfo field in fields) { var doc = new PropertyDoc(); doc.Label = field.Name; string propertyName = ""; if (TypeHelper.IsExist(field.PropertyType)) { propertyName = field.Name; doc.Comment = this.GetComment(field.Name); } else { var _type = Types.SingleOrDefault<Type>(e => e.Name.Trim() == field.Name.Trim()); if (_type != null) { propertyName = field.Name + "_ID"; doc.Comment = this.GetComment(field.Name); } else { propertyName = field.Name; doc.Comment = this.GetComment(field.Name); } } doc.PropertyName = propertyName; if (propertyName != "ID" || propertyName != "AddDate" || propertyName != "UpdateDate") this._result.Add(doc); } fields = TypeContext.BaseType.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); foreach (PropertyInfo field in fields) { var doc = new PropertyDoc(); doc.PropertyName = field.Name; doc.Label = field.Name; doc.Comment = this.GetComment(field.Name); this._result.Add(doc); } }