You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Infrastructure.Excel.Attributes;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace Infrastructure.Excel
|
|
|
|
|
{
|
|
|
|
|
public class TableColumnInfo
|
|
|
|
|
{
|
|
|
|
|
public PropertyInfo Property { get; set; }
|
|
|
|
|
public ExcelColumnAttribute Attribute { get; set; }
|
|
|
|
|
public List<TableColumnInfo> ChildHeaderInfos { get; set; }
|
|
|
|
|
|
|
|
|
|
public int Depth
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var depth = 1;
|
|
|
|
|
if (ChildHeaderInfos != null && ChildHeaderInfos.Any())
|
|
|
|
|
{
|
|
|
|
|
depth += ChildHeaderInfos.Max(c => c.Depth);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return depth;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|