MoveWorkItem() public method

public MoveWorkItem ( WorkItem workItem, WorkStep toStep ) : void
workItem WorkItem
toStep WorkStep
return void
        public void UpdateWorkItem(WorkItem changedWorkItem)
        {
            var currentWorkItem = GetWorkItemOrThrow(changedWorkItem.Id);

            ThrowIfConflictingTimestamp(currentWorkItem, changedWorkItem);

            currentWorkItem =
                currentWorkItem.UpdatePropertiesAndOrdinalFrom(changedWorkItem).UpdateTimestamp(TimeSource.GetTime());

            var leafStep = WorkflowRepository.GetLeafStep(changedWorkItem.Path);

            if (changedWorkItem.Path == currentWorkItem.Path || currentWorkItem.Path == leafStep.Path)
            {
                WorkflowRepository.UpdateWorkItem(currentWorkItem);
            }
            else
            {
                var mover = new WorkItemMover(WorkflowRepository, TimeSource);
                mover.MoveWorkItem(currentWorkItem, leafStep);
            }
        }
        public void UpdateWorkItem(WorkItem changedWorkItem)
        {
            var currentWorkItem = GetWorkItemOrThrow(changedWorkItem.Id);

            ThrowIfConflictingTimestamp(currentWorkItem, changedWorkItem);

            currentWorkItem =
                currentWorkItem.UpdatePropertiesAndOrdinalFrom(changedWorkItem).UpdateTimestamp(TimeSource.GetTime());

            var leafStep = WorkflowRepository.GetLeafStep(changedWorkItem.Path);

            if (changedWorkItem.Path == currentWorkItem.Path || currentWorkItem.Path == leafStep.Path)
            {
                WorkflowRepository.UpdateWorkItem(currentWorkItem);
            }
            else
            {
                var mover = new WorkItemMover(WorkflowRepository,TimeSource);
                mover.MoveWorkItem(currentWorkItem, leafStep);
            }
        }