Ejemplo n.º 1
0
        public static bool Shift(ExecutedBlock toShift, ExecutedBlock target, ExecutionView view)
        {
            var shiftTransformation = new ShiftBehindTransformation(toShift, target);

            view.Apply(shiftTransformation);

            return(!view.IsAborted);
        }
Ejemplo n.º 2
0
        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);
        }