Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationException"/> class and creates a descriptive message from the validation log.
 /// </summary>
 /// <param name="validationLogData">The validation log data.</param>
 /// <exception cref="ArgumentNullException">The log is empty.</exception>
 public ValidationException(ValidationLogData validationLogData)
     : base(BuildExceptionString(validationLogData))
 {
     _serializableValidationLogData = validationLogData.MakeSerializable();
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationException"/> class during deserialization.
 /// </summary>
 /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"></see> that contains contextual information about the source or destination.</param>
 /// <exception cref="T:System.ArgumentNullException">The info parameter is null. </exception>
 protected ValidationException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _serializableValidationLogData =
         (SerializableValidationLogData)info.GetValue("SerializableValidationLogData", typeof(SerializableValidationLogData));
 }