Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="TReport"></typeparam>
        /// <param name="nodes"></param>
        /// <param name="visitor"></param>
        /// <returns></returns>
        private List <ReportObject> VisitXmlNodes(List <XmlNode> nodes, ReportVisitor visitor)
        {
            List <ReportObject> list          = new List <ReportObject>();
            DateTime            lastTimeStamp = DateTime.MinValue;

            visitor.Reset();
            foreach (XmlNode node in nodes)
            {
                ReportObject report = (ReportObject)Activator.CreateInstance(this.reportType);

                report.LoadFromXml(node);

                list.Add(report);
                visitor.AddReportToBatch(report);

                lastTimeStamp = (lastTimeStamp < report.Date) ? report.Date : lastTimeStamp;
            }

            visitor.VisitBatchReport();

            StreamProgress progress = new StreamProgress(this.progressFilePath, streamIdentifier, lastTimeStamp, true);

            progress.SaveProgress();

            return(list);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="report"></param>
 public void AddReportToBatch(ReportObject report)
 {
     this.reportObjectList.Add(report);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="report"></param>
 public abstract void VisitReport(ReportObject report);
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="report"></param>
 public override void VisitReport(ReportObject report)
 {
     System.Diagnostics.Trace.TraceInformation(report.ConvertToXml());
 }