public CreateProductHttpAction(GetAction get, ExecuteAction execute, RevertAction revert, PostProductRequest createProductRequest) : base(get, execute, revert) { CreateRequest = createProductRequest; GetRequest = new GetProductRequest { ExternalIdentifier = createProductRequest.ExternalIdentifier }; DeleteRequest = new DeleteProductRequest { ExternalIdentifier = createProductRequest.ExternalIdentifier }; }
public override void Revert(object previousState) { RevertAction revertAction = previousState as RevertAction; if (revertAction != null) { // Our revert logic should run. It will eventually call base.Revert. revertAction(); } else { // We have no revert logic, so just call the base implementation. base.Revert(previousState); } }
public static bool FindPosibleRevertAction( bool finished, bool readyForDevolution, bool isCompanyEvalFinished, bool isResponsibleEvalFinished, bool isAutoEvalFinished, bool isEvaluatorEvalFinished, RevertAction action) { return(GetPosibleRevertActions(finished, readyForDevolution, isCompanyEvalFinished, isResponsibleEvalFinished, isAutoEvalFinished, isEvaluatorEvalFinished) .Contains(action)); }
public HttpAction(GetAction get, ExecuteAction execute, RevertAction revert) { Get = get; Execute = execute; Revert = revert; }