ProjectOptions#
Options passed to the Project constructor. Create one with new ProjectOptions() and set its properties. Passing null to the constructor gives the defaults.
Declaration#
public sealed class ProjectOptions : IDeepCloneable<ProjectOptions>
The project copies the options when it's created. Changing this object afterwards has no effect on an existing project.
Constructors#
ProjectOptions()#
public ProjectOptions()
Creates options with every property at its default.
Properties#
Validation#
public Validation Validation { get; set; } = Validation.Strict;
How the project treats invalid input. Default: Validation.Strict.
| Value | Effect |
|---|---|
Validation.Strict |
Invalid input throws an InputException with the path of the bad field. |
Validation.Repair |
Fixable input is repaired, and each fix is reported as a Note.Repaired entry in ScheduleResult.Notes. |
See Validation for what repair changes.
Methods#
DeepClone#
public ProjectOptions DeepClone()
Returns a copy that shares no state with this instance.
Returns - a new ProjectOptions with the same values.
ToString#
public override string ToString()
Returns a debug dump of the fields, e.g. ProjectOptions { Validation: Repair }.
Example#
using Plen;
var project = new Project(new ProjectOptions { Validation = Validation.Repair });
Related#
Project- the constructor that takes these optionsValidation- strict or repair validation and what repair changesInputException- thrown for invalid input in strict mode- Accept messy input - turning on repair mode