Exemple #1
0
        private void _Init(WbTechReportLevel runLevel, object[] inputObjects)
        {
            if (!AcceptedRunLevels.Contains(runLevel))
            {
                List <string> acceptedLevelString = EnumUtil.GetStringListFromEnumList(AcceptedRunLevels);
                string        exceptionText       = string.Format("Report {0} does not support the intended runLevel {1}.  Accepted Levels [{2}].",
                                                                  ReportName,
                                                                  EnumUtil.GetEnumStringFromInteger(typeof(WbTechReportLevel), (int)runLevel),
                                                                  string.Join(", ", acceptedLevelString.ToArray()));
                throw new ArgumentException(exceptionText);
            }

            GatLogger.Instance.AddMessage(string.Format("Starting {0}.", ReportName), LogMode.LogAndScreen);

            _ReportText = new StringBuilder();
            _PrepareData(inputObjects);
        }
Exemple #2
0
 public WbTechReport(WbTechReportLevel runLevel, DateTime reportDate, object[] inputObjects)
 {
     _RunLevel   = runLevel;
     _ReportDate = reportDate;
     _Init(_RunLevel, inputObjects);
 }