private string GetColumnName(PropertyInfo property) { ExcelMappingNameAttribute attribute = property.GetCustomAttributes(typeof(ExcelMappingNameAttribute), true).FirstOrDefault() as ExcelMappingNameAttribute; return((attribute == null || attribute.Name == null) ? property.Name : attribute.Name); }
private int GetOrderIndex(PropertyInfo property) { ExcelMappingNameAttribute attribute = property.GetCustomAttributes(typeof(ExcelMappingNameAttribute), true).FirstOrDefault() as ExcelMappingNameAttribute; return((attribute == null) ? int.MaxValue : attribute.OrderIndex); }