Example #1
0
        /// <summary>
        /// Method that is called by default when validation fails.  Overwrite this to customize response
        /// </summary>
        /// <param name="eventArgs">Information about the value that is being Validated</param>
        private static void _defaultUnexpectedHandler(GuardEventArgs eventArgs)
        {
            GuardViolationException pe = new GuardViolationException(eventArgs.ApplicationName, eventArgs.Message);

            pe.Data.Add("ValidationDetails", eventArgs);
            throw pe;
        }
Example #2
0
 /// <summary>
 /// Method that is called by default when validation fails.  Overwrite this to customize response
 /// </summary>
 /// <param name="eventArgs">Information about the value that is being Validated</param>
 private static void _defaultUnexpectedHandler(GuardEventArgs eventArgs)
 {
     GuardViolationException pe = new GuardViolationException(eventArgs.ApplicationName, eventArgs.Message);
     pe.Data.Add("ValidationDetails", eventArgs);
     throw pe;
 }