IConstraint.cs 511 B

1234567891011121314151617
  1. namespace Jint;
  2. /// <summary>
  3. /// A constraint that engine can check for validate during statement execution.
  4. /// </summary>
  5. public abstract class Constraint
  6. {
  7. /// <summary>
  8. /// Called before each statement to check if your requirements are met; if not - throws an exception.
  9. /// </summary>
  10. public abstract void Check();
  11. /// <summary>
  12. /// Called before script is run. Useful when you use an engine object for multiple executions.
  13. /// </summary>
  14. public abstract void Reset();
  15. }