public SheetRangeGroup Select(Func <int, bool> indexSelector) { IEnumerable <SheetRange> select() { for (int index = Range.Start.row; index <= Range.End.row; index++) { if (indexSelector(index)) { yield return(new SheetRange(Range.Sheet, (Range.Start.row + index, Range.Start.col), (Range.Start.row + index, Range.End.col))); } } } return(new SheetRangeGroup(select())); }
public SheetRange this[int?startOffset, int?endOffset] { get { if (startOffset is null) { startOffset = 0; } if (endOffset is null) { endOffset = Range.RowLength - 1; } return(new SheetRange(Range.Sheet, (Range.Start.row + startOffset.Value, Range.Start.col), (Range.Start.row + endOffset.Value, Range.End.col))); } }
public SheetRange this[int?startOffset, int?endOffset] { get { if (startOffset is null) { startOffset = 0; } if (endOffset is null) { endOffset = Range.ColumnLengh - 1; } return(new SheetRange(Range.Sheet, (Range.Start.row, Range.Start.col + startOffset.Value), (Range.End.row, Range.Start.col + endOffset.Value))); } }
public SheetRangeRowSelector(SheetRange range) { Range = range; }
public SheetRangeColumnSelector(SheetRange range) { Range = range; }