protected void MakeSureRequestedCalculationIsValid(TargetingCalculationInfo calculationInfo) { if (calculationInfo.StatusCode > 0) { var issue = new ErrorIssue( "Your calculation (ID: " + calculationInfo.Id + ") has already been run on " + calculationInfo.StartedOn + ", it doesn't make sense to run the same calcualtion multiple times." ); throw new ValidationException(issue); } }
public void SerializeValidationIssue(ErrorIssue issue, IJsonWriter writer) { this.Serialize(issue.Message, No.ValidationIssues, writer); }
public void Resolve(ErrorIssue issue) { this.serializer.SerializeValidationIssue(issue, writer); }