/// <summary> /// Builds an operation that determines whether a cell has a value. /// </summary> /// <param name="cellLocator">The cell locator.</param> /// <returns> /// The operation. /// </returns> public static HasCellValueOp HasValue( this CellLocatorBase cellLocator) { var result = new HasCellValueOp(Op.Const(cellLocator)); return(result); }
/// <inheritdoc /> public async Task <bool> ExecuteAsync( HasCellValueOp operation) { // NOTE: THIS CODE IS A NEAR DUPLICATE OF THE SYNC METHOD ABOVE; NO GOOD WAY TO D.R.Y. IT OUT if (operation == null) { throw new ArgumentNullException(nameof(operation)); } var locatedCell = await this.GetCellAndExecuteOperationIfNecessaryAsync(operation.CellLocator); var result = locatedCell.Cell.HasCellValue(); return(result); }
/// <inheritdoc /> public bool Execute( HasCellValueOp operation) { // NOTE: THIS CODE IS A NEAR DUPLICATE OF THE ASYNC METHOD BELOW; NO GOOD WAY TO D.R.Y. IT OUT if (operation == null) { throw new ArgumentNullException(nameof(operation)); } var locatedCell = this.GetCellHavingValueAndExecuteOperationIfNecessary(operation.CellLocator); var result = locatedCell.Cell.HasCellValue(); return(result); }