/// <summary> /// Adds a new constraint to the constraint manager. /// </summary> /// <param name="scanConstraint">The new constraint.</param> /// <param name="hasPriority">Whether or not the new constraint has priority for conflicts.</param> public void AddConstraint(ScanConstraint scanConstraint, Boolean hasPriority = true) { // Resolve potential conflicts depending on if the new constraint has priority if (scanConstraint.Constraint == ConstraintsEnum.NotScientificNotation) { if (this.ElementType != typeof(Single) && this.ElementType != typeof(Double)) { return; } } this.ValueConstraints.Add(scanConstraint); }
/// <summary> /// Removes the specified constraint. /// </summary> /// <param name="scanConstraint">The constraint to remove.</param> public void RemoveConstraints(ScanConstraint scanConstraint) { this.ValueConstraints.Remove(scanConstraint); }