Exemplo n.º 1
0
        public ValidationContext(ValidationSettings settings, ValidationCache cache)
        {
            Cache     = cache ?? throw new ArgumentNullException(nameof(cache));
            Settings  = settings ?? throw new ArgumentNullException(nameof(settings));
            Errors    = new List <ValidationErrorInfo>();
            McContext = new MCContext(false);

            Stack = new ValidationStack();

            Stack.Push(Errors.Add);
        }
Exemplo n.º 2
0
        public ValidationContext(ValidationSettings settings, ValidationCache cache, CancellationToken token)
        {
            _token = token;

            Cache     = cache ?? throw new ArgumentNullException(nameof(cache));
            Settings  = settings ?? throw new ArgumentNullException(nameof(settings));
            Errors    = new List <ValidationErrorInfo>();
            McContext = new MCContext(false);

            Stack = new ValidationStack();
            State = new StateManager(this);

            Stack.Push(Errors.Add);
        }
Exemplo n.º 3
0
 public ValidationContextDisposable(ValidationStack stack)
 {
     _stack = stack;
 }