Beispiel #1
0
        public override void AddMessage(MsgTypes type, string message, Exception exception = null, bool logMessage = false, bool notyMessage = true)
        {
            if (exception == null)
            {
                if (Settings.DeploymentContext == DeploymentContext.Development)
                {
                    Debug.WriteLine($"NOTIFIER >>>> {type.GetText()} : {message}");
                }
                if (logMessage || Settings.Notifications.LogAllMessages || (type == MsgTypes.Error || type == MsgTypes.Warning))
                {
                    log(type, message);
                }

                addMessageSimple(type, message, notyMessage);
            }
            else
            {
                if (Settings.DeploymentContext == DeploymentContext.Development)
                {
                    Debug.WriteLine($"NOTIFIER >>>> EXCP : {exception.Message}");
                }

                logException(type, message, exception);

                addMessage(type, message, exception, notyMessage);
            }
        }
Beispiel #2
0
 public virtual void AddMessage(MsgTypes type, string message, Exception exception = null, bool logMessage = false, bool notyMessage = true)
 {
     if (exception == null)
     {
         if (Settings.DeploymentContext == DeploymentContext.Development)
         {
             Debug.WriteLine($"NOTIFIER >>>> {type.GetText()} : {message}");
         }
         addMessageSimple(type, message, notyMessage);
     }
     else
     {
         if (Settings.DeploymentContext == DeploymentContext.Development)
         {
             Debug.WriteLine($"NOTIFIER >>>> EXCP : {exception.Message}");
         }
         addMessage(type, message, exception, notyMessage);
     }
 }