Esempio n. 1
0
        private static void AddReportEventArgs(RawlerBase sender, ReportEvnetArgs args)
        {
            if (sender != null)
            {
                var reportStock = sender.GetUpperRawler <ReportStock>();
                if (reportStock != null)
                {
                    reportStock.AddReport(args);
                    return;
                }
            }

            if (args.IsErr)
            {
                if (stockErrReport)
                {
                    reportList.Add(args);
                }
            }
            else
            {
                if (stockReport)
                {
                    reportList.Add(args);
                }
            }
        }
Esempio n. 2
0
 public async Task AddReport(ReportEvnetArgs ea)
 {
     if (ea.IsErr && ErrReportTree != null)
     {
         await Task.Run(() => RawlerBase.GetText(ea.DateTime.ToFileTimeUtc() + "\t" + ea.Message, ErrReportTree, this));
     }
     if (isStock && ea.IsErr)
     {
         reportList.Add(ea);
     }
 }
Esempio n. 3
0
        public static void Report(RawlerBase sender, string message, bool returncode)
        {
            ReportEvnetArgs args = new ReportEvnetArgs(sender, GetTopComment(sender) + message, returncode);

            AddReportEventArgs(sender, args);
            if (message.Contains("NextDataRow"))
            {
                RowCount++;
            }
            else
            {
                ReportEvnet?.Invoke(sender, args);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Errをレポートする。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="err"></param>
        public static void ErrReport(RawlerBase sender, string err)
        {
            ReportEvnetArgs args;

            if (sender != null)
            {
                args = new ReportEvnetArgs(sender, GetTopComment(sender) + "ERR:" + sender.GetType().Name + ":" + err, true, true);
            }
            else
            {
                args = new ReportEvnetArgs(sender, GetTopComment(sender) + "ERR:" + err, true, true);
            }
            AddReportEventArgs(sender, args);
            ErrReportEvent?.Invoke(sender, args);
        }
Esempio n. 5
0
 void ReportManage_ReportEvnet(object sender, ReportEvnetArgs e)
 {
     this.ReportProgress(0, e);
 }