Beispiel #1
0
        public override bool execute()
        {
            if (sourceObject == null)
            {
                DI.log.error("source object was null");
            }
            else
            if (sourceObject.GetType() != sourceType)
            {
                DI.log.error("source object type was not List<string> is was " + sourceObject.GetType().FullName);
            }
            else
            {
                var filesToProcess = (List <string>)sourceObject;

                setProgressBarValue(filesToProcess.Count);

                var o2Assessment = new O2Assessment();
                foreach (string file in filesToProcess)
                {
                    DI.log.info("Importing file {0}", file);
                    if (false == o2AssessmentLoad.importFile(file, o2Assessment))
                    {
                        return(false);
                    }
                    DI.log.info("There are {0} Findings loaded ", o2Assessment.o2Findings.Count);
                    incProgressBarValue();
                }
                resultsObject = o2Assessment;
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 public O2Assessment(IO2AssessmentLoad o2AssessmentLoad, string sPathToAssessmentToOpen) 
     : this()
 {
     o2AssessmentLoad.importFile(sPathToAssessmentToOpen, this);
 }
 public O2Assessment(IO2AssessmentLoad o2AssessmentLoad, string sPathToAssessmentToOpen)
     : this()
 {
     o2AssessmentLoad.importFile(sPathToAssessmentToOpen, this);
 }