public static bool Shift(ExecutedBlock toShift, ExecutedBlock target, ExecutionView view) { var shiftTransformation = new ShiftBehindTransformation(toShift, target); view.Apply(shiftTransformation); return(!view.IsAborted); }
private bool ensurePosition(ExecutedBlock beforeBlock, ExecutedBlock afterBlock, ExecutionView view, List <Transformation> transformations) { if (view.IsBefore(beforeBlock, afterBlock)) { //no transformation is required return(true); } //we need to get after block behind before block var shiftTransform = new ShiftBehindTransformation(afterBlock, beforeBlock); transformations.Add(shiftTransform); view.Apply(shiftTransform); return(!view.IsAborted); }