示例#1
0
 protected void Log(string msg, Logging.LogEventArgs.MessageType type = global::Utils.Logging.LogEventArgs.MessageType.Info, bool newline = true)
 {
     Logging?.Invoke(this, new Logging.LogEventArgs()
     {
         Message = msg, Type = type, Newline = newline
     });
 }
示例#2
0
        public void ReportMessage(string msg, Logging.LogEventArgs.MessageType type = Logging.LogEventArgs.MessageType.Info, bool newline = true)
        {
            switch (type)
            {
            case Logging.LogEventArgs.MessageType.Info:
                ReportInfo(msg, newline);
                break;

            case Logging.LogEventArgs.MessageType.Warning:
                ReportWarning(msg, newline);
                break;

            case Logging.LogEventArgs.MessageType.Error:
                ReportError(msg, newline);
                break;

            case Logging.LogEventArgs.MessageType.Success:
                ReportSuccess(msg, newline);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }