TableSelectBuilder(ITableSource from, List <IWhereClause> whereClauses, List <OrderByField> orderByClauses, ISelectColumns columnSelection = null, IRowSelection rowSelection = null) : base(whereClauses, orderByClauses, columnSelection, rowSelection) { From = from; }
UnionSelectBuilder(ISelect innerSelect, string customAlias, ITableAliasGenerator tableAliasGenerator, List <IWhereClause> whereClauses, List <OrderByField> orderByClauses, ISelectColumns columnSelection = null, IRowSelection rowSelection = null) : base(whereClauses, orderByClauses, columnSelection, rowSelection) { this.innerSelect = innerSelect; this.customAlias = customAlias; this.tableAliasGenerator = tableAliasGenerator; }
readonly OrderBy orderBy; // Can be null public Select(IRowSelection rowSelection, ISelectColumns columns, ISelectSource from, Where where, OrderBy orderBy) { this.rowSelection = rowSelection; this.columns = columns; this.from = from; this.where = where; this.orderBy = orderBy; }
protected SelectBuilderBase(List <IWhereClause> whereClauses, List <OrderByField> orderByClauses, ISelectColumns columnSelection = null, IRowSelection rowSelection = null) { WhereClauses = whereClauses; OrderByClauses = orderByClauses; this.RowSelection = rowSelection; this.ColumnSelection = columnSelection; }
public FitElement(IRowSelection rowSelection) { _independentVariables = new IReadableColumnProxy[0]; _dependentVariables = new IReadableColumnProxy[0]; _errorEvaluation = new IVarianceScaling[0]; _rangeOfRows = (IRowSelection)(rowSelection?.Clone()) ?? new AllRows(); }
/// <summary> /// Initializes a new instance of the <see cref="UnionOfRowSelections"/> class. /// </summary> /// <param name="rowSelectionsHead">The first row selections (cloned before stored).</param> /// <param name="selection">Another selection (cloned before stored).</param> /// <param name="rowSelectionTail">The last row selections (cloned before stored).</param> public UnionOfRowSelections(IEnumerable <IRowSelection> rowSelectionsHead, IRowSelection selection, IEnumerable <IRowSelection> rowSelectionTail) { _rowSelections = new List <IRowSelection>(rowSelectionsHead.Select(itemToClone => { var clonedItem = (IRowSelection)itemToClone.Clone(); clonedItem.ParentObject = this; return(clonedItem); })); { var item = (IRowSelection)selection.Clone(); item.ParentObject = this; _rowSelections.Add(item); } _rowSelections.AddRange(rowSelectionTail.Select(itemToClone => { var clonedItem = (IRowSelection)itemToClone.Clone(); clonedItem.ParentObject = this; return(clonedItem); })); }
protected SelectBuilderBase(TSource from, List <IWhereClause> whereClauses, List <OrderByField> orderByClauses, ISelectColumns columnSelection, IRowSelection rowSelection, bool shouldIgnoreDefaultOrderBy) { From = from; WhereClauses = whereClauses; OrderByClauses = orderByClauses; this.RowSelection = rowSelection; this.ColumnSelection = columnSelection; this.ShouldIgnoreDefaultOrderBy = shouldIgnoreDefaultOrderBy; }
public FitElement(DataTable table, int groupNumber, IRowSelection rowSelection, IReadableColumn xColumn, IReadableColumn yColumn) { if (null == rowSelection) { throw new ArgumentNullException(nameof(rowSelection)); } ChildSetMember(ref _dataTable, new DataTableProxy(table)); _groupNumber = groupNumber; ChildCloneToMember(ref _rangeOfRows, rowSelection); _independentVariables = new IReadableColumnProxy[1]; ChildSetMember(ref _independentVariables[0], ReadableColumnProxyBase.FromColumn(xColumn)); _dependentVariables = new IReadableColumnProxy[1]; ChildSetMember(ref _dependentVariables[0], ReadableColumnProxyBase.FromColumn(yColumn)); _errorEvaluation = new IVarianceScaling[1]; _errorEvaluation[0] = new ConstantVarianceScaling(); }
public IRowSelectionCollection WithAdditionalItem(IRowSelection item) { return new IntersectionOfRowSelections(_rowSelections.Concat(new[] { item })); }
public void AddTop(int top) { RowSelection = new Top(top); }
/// <summary> /// Returns a new instance that resembles this instance, but with the item at index <paramref name="idx"/> set to another item <paramref name="item"/>. /// </summary> /// <param name="idx">The index to change.</param> /// <param name="item">The new item at this index.</param> /// <returns>New instance that resembles this instance, but with the item at index <paramref name="idx"/> set to another item <paramref name="item"/>.</returns> public IRowSelectionCollection WithChangedItem(int idx, IRowSelection item) { return(new UnionOfRowSelections(_rowSelections.Take(idx), item, _rowSelections.Skip(idx + 1))); }
TableSelectBuilder(ITableSource from, List <IWhereClause> whereClauses, List <OrderByField> orderByClauses, ISelectColumns columnSelection, IRowSelection rowSelection, bool shouldIgnoreDefaultOrderBy) : base(from, whereClauses, orderByClauses, columnSelection, rowSelection, shouldIgnoreDefaultOrderBy) { }
public FitElement(DataTable table, int groupNumber, IRowSelection rowSelection, IReadableColumn xColumn, IReadableColumn yColumn) { if (null == table) throw new ArgumentNullException(nameof(table)); if (null == rowSelection) throw new ArgumentNullException(nameof(rowSelection)); ChildSetMember(ref _dataTable, new DataTableProxy(table)); _groupNumber = groupNumber; ChildCloneToMember(ref _rangeOfRows, rowSelection); _independentVariables = new IReadableColumnProxy[1]; _independentVariables[0] = ReadableColumnProxyBase.FromColumn(xColumn); _dependentVariables = new IReadableColumnProxy[1]; _dependentVariables[0] = ReadableColumnProxyBase.FromColumn(yColumn); _errorEvaluation = new IVarianceScaling[1]; _errorEvaluation[0] = new ConstantVarianceScaling(); }
public FitElement() { _independentVariables = new IReadableColumnProxy[0]; _dependentVariables = new IReadableColumnProxy[0]; _errorEvaluation = new IVarianceScaling[0]; _rangeOfRows = new AllRows(); }
public IRowSelectionCollection WithChangedItem(int idx, IRowSelection item) { return new IntersectionOfRowSelections(_rowSelections.Take(idx), item, _rowSelections.Skip(idx + 1)); }
/// <summary> /// Returns a new instance with all row selections from this instance plus one additional item. /// </summary> /// <param name="item">The item (cloned before stored).</param> /// <returns>New instance with all row selections from this instance plus one additional item.</returns> public IRowSelectionCollection WithAdditionalItem(IRowSelection item) { return(new UnionOfRowSelections(_rowSelections.Concat(new[] { item }), _mergeAdjoiningSegments)); }
public IntersectionOfRowSelections(IEnumerable<IRowSelection> rowSelectionsHead, IRowSelection selection, IEnumerable<IRowSelection> rowSelectionTail) { _rowSelections = new List<IRowSelection>(rowSelectionsHead.Select(item => { var result = (IRowSelection)item.Clone(); item.ParentObject = this; return item; })); { var item = (IRowSelection)selection.Clone(); item.ParentObject = this; _rowSelections.Add(item); } _rowSelections.AddRange(rowSelectionTail.Select(item => { var result = (IRowSelection)item.Clone(); item.ParentObject = this; return item; })); }
/// <summary> /// Returns a new instance with all row selections from this instance plus one additional item. /// </summary> /// <param name="item">The item (cloned before stored).</param> /// <returns>New instance with all row selections from this instance plus one additional item.</returns> public IRowSelectionCollection WithAdditionalItem(IRowSelection item) { return(new ExcludeUnionOfRowSelections(_rowSelections.Concat(new[] { item }))); }