public SqlFetch Fetch(SqlFetchOption option, SqlExpression rowCount, params ISqlCursorFetchTarget[] target) { if (!rowCount.IsNullReference()) { if (option != SqlFetchOption.Absolute && option != SqlFetchOption.Relative) { throw new ArgumentException(Strings.ExInvalidUsageOfTheRowCountArgument, "rowCount"); } SqlValidator.EnsureIsArithmeticExpression(rowCount); } else if (option == SqlFetchOption.Absolute || option == SqlFetchOption.Relative) { throw new ArgumentException(Strings.ExInvalidUsageOfTheOrientationArgument, "option"); } if (target != null) { for (int i = 0, l = target.Length; i < l; i++) { ArgumentValidator.EnsureArgumentNotNull(target[i], "target"); } } return(new SqlFetch(option, rowCount, this, target)); }