Esempio n. 1
0
 ///-------------------------------------------------------------------------------------------------
 /// <summary>
 ///  Logs the given message.
 /// </summary>
 /// <param name="message">
 ///  The message.
 /// </param>
 ///-------------------------------------------------------------------------------------------------
 public void Log(DiagnosticMessage message)
 {
     Contract.Requires(message != null, "message");
     _context.Log(message);
 }
Esempio n. 2
0
 /// <summary>
 ///     Une erreur est survenue pendant la notification d'un événement.
 /// </summary>
 /// <param name="log"></param>
 /// <param name="ex"></param>
 private static void NotifyEventError(ISessionContext log, Exception ex)
 {
     Contract.Requires(log, "log");
     log.Log(new DiagnosticMessage(MessageType.Error, ex.Message, "Notifications", false, null, ex));
 }
Esempio n. 3
0
 ///-------------------------------------------------------------------------------------------------
 /// <summary>
 ///  Creates error message.
 /// </summary>
 /// <param name="message">
 ///  The message.
 /// </param>
 /// <param name="propertyName">
 ///  (Optional) The name of the property.
 /// </param>
 /// <param name="ex">
 ///  (Optional) the ex.
 /// </param>
 ///-------------------------------------------------------------------------------------------------
 public void CreateErrorMessage(string message, string propertyName = null, Exception ex = null)
 {
     _sessionContext.Log(new DiagnosticMessage(MessageType.Error, MessageHelper.CreateMessage(message, Element), _category, true, Element, ex, propertyName ?? PropertyName));
 }
Esempio n. 4
0
 ///-------------------------------------------------------------------------------------------------
 /// <summary>
 ///  Logs a message.
 /// </summary>
 /// <param name="message">
 ///  The message.
 /// </param>
 ///-------------------------------------------------------------------------------------------------
 public void Log(DiagnosticMessage message)
 {
     Contract.Requires(message, "message");
     _log.Log(message);
 }