コード例 #1
0
 public LogItem(DateTime dateTime, string message, string fullMessage, EnumData.LogTypeCommand mtype, EnumData.LogSourceCommand logSource)
 {
     DateTime    = dateTime;
     Message     = message;
     FullMessage = fullMessage;
     MType       = mtype;
     LogSource   = logSource;
 }
コード例 #2
0
        public static string GetSource(EnumData.LogSourceCommand sc)
        {
            switch (sc)
            {
            case EnumData.LogSourceCommand.Other:
                return("OTHER");

            case EnumData.LogSourceCommand.Google:
                return("GOOGLE");

            case EnumData.LogSourceCommand.VK:
                return("VK");

            case EnumData.LogSourceCommand.Mail:
                return("MAIL");
            }
            return(null);
        }
コード例 #3
0
 public static void Log(string message, string fullMessage, EnumData.LogTypeCommand mtype, EnumData.LogSourceCommand logSource)
 {
     Task.Factory.StartNew(() =>
     {
         var logItem = new LogListCollect.LogItem(DateTime.Now, message, fullMessage, mtype, logSource);
         LogListCollect.LogItemsWriteList.Add(logItem);
     });
 }