コード例 #1
0
        public void Filterable_SetsType()
        {
            GridFilterType?actual   = column.Filterable(GridFilterType.Double).Filter.Type;
            GridFilterType?expected = GridFilterType.Double;

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void Filterable_SetsIsEnabled(Boolean isEnabled)
        {
            Boolean?actual   = column.Filterable(isEnabled).Filter.IsEnabled;
            Boolean?expected = isEnabled;

            Assert.Equal(expected, actual);
        }
コード例 #3
0
        public static IGridColumn <T> Filterable <T, TQ>(this IGridColumn <T> column, bool isColumnFilterable, Expression <Func <T, TQ> > filterProperty) where T : class
        {
            if (filterProperty.Body.NodeType != ExpressionType.MemberAccess)
            {
                throw new ArgumentException("filterProperty");
            }
            var propertyName = ((MemberExpression)filterProperty.Body).Member.Name;

            return(column.Filterable(isColumnFilterable, propertyName));
        }
コード例 #4
0
        public void Filterable_Configure_SetsIsEnabled(Boolean?current, Boolean enabled)
        {
            column.Filter.IsEnabled = current;

            Boolean?actual   = column.Filterable(_ => { }).Filter.IsEnabled;
            Boolean?expected = enabled;

            Assert.Equal(expected, actual);
        }
コード例 #5
0
 public static IGridColumn <T> Filterable <T>(this IGridColumn <T> column, bool isColumnFilterable) where T : class
 {
     return(column.Filterable(isColumnFilterable, ((GridColumn <T>)column).Name));
 }