Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LazyInitializationException"/> class.
 /// </summary>
 /// <param name="message">The message that describes the error. </param>
 /// <param name="innerException">
 /// The exception that is the cause of the current exception. If the innerException parameter
 /// is not a null reference, the current exception is raised in a catch block that handles
 /// the inner exception.
 /// </param>
 public LazyInitializationException(string message, Exception innerException) : base(message, innerException)
 {
     LoggerProvider.LoggerFor(typeof(LazyInitializationException)).Error(message, this);
 }
Пример #2
0
 public static void SetLoggersFactory(ILoggerFactory loggerFactory)
 {
     instance = new LoggerProvider(loggerFactory);
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssertionFailure"/> class.
 /// </summary>
 /// <param name="message">The message that describes the error. </param>
 /// <param name="innerException">
 /// The exception that is the cause of the current exception. If the innerException parameter
 /// is not a null reference, the current exception is raised in a catch block that handles
 /// the inner exception.
 /// </param>
 public AssertionFailure(string message, Exception innerException) : base(message, innerException)
 {
     LoggerProvider.LoggerFor(typeof(AssertionFailure)).Error(DefaultMessage, innerException);
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssertionFailure"/> class.
 /// </summary>
 /// <param name="message">The message that describes the error. </param>
 public AssertionFailure(string message) : base(message)
 {
     LoggerProvider.LoggerFor(typeof(AssertionFailure)).Error(DefaultMessage, this);
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssertionFailure"/> class.
 /// </summary>
 public AssertionFailure() : base(String.Empty)
 {
     LoggerProvider.LoggerFor(typeof(AssertionFailure)).Error(DefaultMessage);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NonUniqueResultException"/> class.
 /// </summary>
 /// <param name="resultCount">The number of items in the result.</param>
 public NonUniqueResultException(int resultCount)
     : base("query did not return a unique result: " + resultCount.ToString())
 {
     LoggerProvider.LoggerFor(typeof(NonUniqueResultException)).Error("query did not return a unique result: " +
                                                                      resultCount.ToString());
 }