protected override OperationBase DeepCloneInternal() { var result = new ExecuteOperationCellIfNecessaryOp <TValue>( this.Cell?.DeepClone()); return(result); }
public ExecuteOperationCellIfNecessaryOp <TValue> DeepCloneWithCell(IOperationOutputCell <TValue> cell) { var result = new ExecuteOperationCellIfNecessaryOp <TValue>( cell); return(result); }
/// <inheritdoc /> public bool Equals(ExecuteOperationCellIfNecessaryOp <TValue> other) { if (ReferenceEquals(this, other)) { return(true); } if (ReferenceEquals(other, null)) { return(false); } var result = this.Cell.IsEqualTo(other.Cell); return(result); }
/// <inheritdoc /> public async Task ExecuteAsync( ExecuteOperationCellIfNecessaryOp <TValue> 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 cell = operation.Cell; try { DataStructureCellProtocols.CurrentCellStack.Push(cell); await this.ExecuteOperationCellIfNecessaryAsync(cell); } finally { var poppedCell = DataStructureCellProtocols.CurrentCellStack.Pop(); DataStructureCellProtocols.ThrowIfUnexpectedCellPoppedOffCurrentCellStack(cell, poppedCell); } }