private DeployStep Move(DeployStepMoveRequest request) { //_permissionValidator.VerifyCurrentUserProjectPermission(request.ProjectId, EnumPermissionAccess. if(request == null) { throw new ArgumentNullException("request is null"); } if(string.IsNullOrEmpty(request.Id)) { throw new ArgumentNullException("request.id is null"); } if (string.IsNullOrEmpty(request.ProjectId)) { throw new ArgumentNullException("request.projectId is null"); } if (string.IsNullOrEmpty(request.ParentId)) { throw new ArgumentNullException("request.parentId is null"); } if (request.ParentType == EnumDeployStepParentType.Unknown) { throw new ArgumentNullException("request.parentType is null"); } switch(request.Direction) { case DeployStepMoveRequest.EnumDirection.Up: return _projectManager.MoveDeploymentStepUp(request.ProjectId, request.ParentType, request.ParentId, request.Id); case DeployStepMoveRequest.EnumDirection.Down: return _projectManager.MoveDeploymentStepDown(request.ProjectId, request.ParentType, request.ParentId, request.Id); default: throw new UnknownEnumValueException(request.Direction); } }
public object Put(DeployStepMoveRequest request) { return this.Move(request); }