示例#1
0
        public static TableColumnConfiguration Create <T>(Expression <Func <T> > propertyLambda, SingleColumnData columnData)
        {
            var me = propertyLambda.Body as MemberExpression;

            if (me == null)
            {
                throw new ArgumentException("You must pass a lambda of the form: '() => Class.Property' or '() => object.Property'");
            }

            var name = me.Member.Name;

            var obj = new TableColumnConfiguration(name, columnData);

            return(obj);
        }
示例#2
0
        public static TableColumnConfiguration Create(string name, SingleColumnData columnData)
        {
            var obj = new TableColumnConfiguration(name, columnData);

            return(obj);
        }