Example #1
0
        private JobResult CreateReportResults()
        {
            switch (reportType)
            {
            case EMSLoadFlowReportType.Node:
            {
                List <EMSLoadFlowNodeRecord> records = CreateEMSLoadFlowNodeRecords();
                EMSLoadFlowNodeResults       results = new EMSLoadFlowNodeResults {
                    Records = records
                };
                return(results);
            }

            case EMSLoadFlowReportType.Generator:
            {
                List <EMSLoadFlowGeneratorRecord> records = CreateEMSLoadFlowGeneratorRecords();
                EMSLoadFlowGeneratorResults       results = new EMSLoadFlowGeneratorResults {
                    Records = records
                };
                return(results);
            }

            case EMSLoadFlowReportType.Load:
            {
                List <EMSLoadFlowLoadRecord> records = CreateEMSLoadFlowLoadRecords();
                EMSLoadFlowLoadResults       results = new EMSLoadFlowLoadResults {
                    Records = records
                };
                return(results);
            }

            default:
            {
                DMSLogger.Log(DMSLogger.LogLevel.Error, "[EMSLoadFlow]: Error while creating results for EMSLoadFlow Report.EMSLoadFlowReportType {0} is unsupported.", reportType);
                return(new JobError(string.Format("Error while creating results for EMSLoadFlow Report.EMSLoadFlowReportType {0} is unsupported.", reportType)));
            }
            }
        }