示例#1
0
        private void AddError(List <EdmItemError> errors, EdmItemError newError)
        {
            ValidationErrorEventArgs e = new ValidationErrorEventArgs(newError);

            this.OnValidationError(e);
            errors.Add(e.ValidationError);
        }
        /// <summary>
        ///     Invoke the event hook Add an error to the list
        /// </summary>
        /// <param name="errors"> The list of errors to add to </param>
        /// <param name="newError"> The new error to add </param>
        private void AddError(List <EdmItemError> errors, EdmItemError newError)
        {
            // Create an event args object and call the event hook, the derived class may have changed
            // the validation error to some other object, in which case we add the validation error object
            // coming from the event args
            var e = new ValidationErrorEventArgs(newError);

            OnValidationError(e);
            errors.Add(e.ValidationError);
        }