/// <summary> /// Datas the is invalid. /// </summary> /// <param name="errors">The errors.</param> /// <returns> /// The new VJson Response Failed instance /// </returns> public static VJsonResponse DataIsInvalid(IEnumerable<IValidationError> errors) { var js = new VJsonResponse(taskcompleted: true, taskaborted: false, dataisvalid: false); js.AddTaskValidationErrorListProperty(errors); return js; }
/// <summary> /// Fails the specified message. /// </summary> /// <param name="message">The message.</param> /// <returns>The new VJson Response Failed instance</returns> public static VJsonResponse Fail(string message = "The task has failed and was aborted. No Exception was thrown!") { var response = new VJsonResponse(taskaborted: true).AddTaskValidationErrorListProperty(message); return response; }