/// <summary> /// Initializes a new instance of the <see cref="GetByFilterParameters"/> class. /// </summary> /// <param name="entityInfo">The entity info.</param> /// <param name="filter">The filter.</param> /// <param name="sort">The sort.</param> /// <param name="pageIndex">Index of the page.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="selectColumns">The select columns.</param> public GetByFilterParameters(FilterExpression filter, SortExpression sort, int pageIndex, int pageSize, ICollection <string> selectColumns, GetSourceTypeEnum sourceType) { if (filter != null) { this.Filter = (FilterExpression)filter.Clone(); } else { this.Filter = new FilterExpression(); } if (sort != null) { this.Sort = (SortExpression)sort.Clone(); } else { this.Sort = new SortExpression(); } this.PageIndex = pageIndex; this.PageSize = pageSize; this.SelectColumns = selectColumns; this.SourceType = sourceType; }
public object Clone() { SortExpression sort = new SortExpression(); foreach (SortInfo s in this.SortInfoList) { sort.SortInfoList.Add((SortInfo)s.Clone()); } return(sort); }
/// <summary> /// Initializes a new instance of the <see cref="GetByFilterParameters"/> class. /// </summary> /// <param name="entityInfo">The entity info.</param> /// <param name="filter">The filter.</param> /// <param name="sort">The sort.</param> /// <param name="pageIndex">Index of the page.</param> /// <param name="pageSize">Size of the page.</param> public GetByFilterParameters(FilterExpression filter, SortExpression sort, int pageIndex, int pageSize) : this(filter, sort, pageIndex, pageSize, null, GetSourceTypeEnum.Table) { }
/// <summary> /// Initializes a new instance of the <see cref="GetByFilterParameters"/> class. /// </summary> /// <param name="entityInfo">The entity info.</param> /// <param name="filter">The filter.</param> /// <param name="sort">The sort.</param> public GetByFilterParameters(FilterExpression filter, SortExpression sort) : this(filter, sort, 0, -1, null, GetSourceTypeEnum.Table) { }