Class RecalculationValidationException
RecalculationValidationException class
Represents an exception which is thrown when errors are found in project after recalculation.
public abstract class RecalculationValidationException : ValidationException
Examples
Shows on what conditions <see cref=“TaskValidationException” /> exception can be thrown.
try
{
var project = new Project { CalculationMode = CalculationMode.None };
var task = project.RootTask.Children.Add("Task");
// accidentally set incorrect dates
task.Set(Tsk.Start, new DateTime(2017, 6, 19, 8, 0, 0));
task.Set(Tsk.Duration, project.GetDuration(1));
task.Set(Tsk.Finish, new DateTime(2017, 6, 18, 17, 0, 0));
// run project recalculation with a flag to run validation
project.Recalculate(true);
}
catch (TaskValidationException ex)
{
Console.WriteLine(ex.Message);
}
See Also
- class ValidationException
- namespace Aspose.Tasks
- assembly Aspose.Tasks