예제 #1
0
 private Report(string name, Repertoire reportoar, DateTime from, DateTime to, ReportDimension rows, ReportDimension columns, PostProcessType postprocess, OutputFormat format, string template)
 {
     Name        = name;
     Reportoar   = reportoar;
     From        = from;
     To          = to;
     Rows        = rows;
     Columns     = columns;
     PostProcess = postprocess;
     Format      = format;
     Template    = template;
 }
예제 #2
0
        public static Model Load(string filePath)
        {
            var file = File.ReadAllText(filePath);

            XElement xml = XElement.Parse(file);

            ValidateXml(xml);
            var source      = xml.Descendants(XNAME_RAWDATASOURCE).Select(x => RawDataSource.Load(x)).FirstOrDefault();
            var reportoires = xml.Descendants(XNAME_REPORTOIRE).Select(x => Repertoire.Load(x)).ToList();
            var reports     = xml.Descendants(XNAME_REPORT).Select(x => Report.Load(x, reportoires)).ToList();

            return(new Model(source, reportoires, reports));
        }