Example #1
0
        private void ConvertDetailedResults(DvtkResultsOverview resultsOverview)
        {
            // parse the dvtk detailed results
            DvtkDetailedResults dvtkDetailedResults = new DvtkDetailedResults();
            String dvtkDetailedResultsFilename      = GetDvtkDetailedResultsFilename(resultsOverview.Oid);

            dvtkDetailedResults.FromXml(dvtkDetailedResultsFilename);

            // set up the evs detailed results
            EvsDetailedResults evsDetailedResults = new EvsDetailedResults();

            evsDetailedResults.ValidationResultsOverview = resultsOverview;
            evsDetailedResults.XmlFmiValidationResults   = dvtkDetailedResults.XmlFmiValidationResults;
            evsDetailedResults.XmlDatasetResults         = dvtkDetailedResults.XmlDatasetResults;
            evsDetailedResults.ValidationErrorCount      = dvtkDetailedResults.ValidationErrorCount;
            evsDetailedResults.ValidationWarningCount    = dvtkDetailedResults.ValidationWarningCount;
            evsDetailedResults.ValidationConditionCount  = dvtkDetailedResults.ValidationConditionCount;
            evsDetailedResults.ValidationResult          = dvtkDetailedResults.ValidationResult;

            // save the evs detailed results file
            String evsDetailedResultsFilename = GetEvsDetailedResultsFilename(resultsOverview.Oid);

            evsDetailedResults.Save(evsDetailedResultsFilename);

            // delete the dvtk detailed results file
            try
            {
                FileInfo dvtkDetailedResultsFileInfo = new FileInfo(dvtkDetailedResultsFilename);
                dvtkDetailedResultsFileInfo.Delete();
            }
            catch (System.Exception)
            {
                // exception thrown if the file is currently being accessed by another process - this will be picked up on the next RemoveCachedData() call.
            }
        }
Example #2
0
        private void ConvertDetailedResults(DvtkResultsOverview resultsOverview)
        {
            // parse the dvtk detailed results
            DvtkDetailedResults dvtkDetailedResults = new DvtkDetailedResults();
            String dvtkDetailedResultsFilename = GetDvtkDetailedResultsFilename(resultsOverview.Oid);
            dvtkDetailedResults.FromXml(dvtkDetailedResultsFilename);

            // set up the evs detailed results
            EvsDetailedResults evsDetailedResults = new EvsDetailedResults();
            evsDetailedResults.ValidationResultsOverview = resultsOverview;
            evsDetailedResults.XmlFmiValidationResults = dvtkDetailedResults.XmlFmiValidationResults;
            evsDetailedResults.XmlDatasetResults = dvtkDetailedResults.XmlDatasetResults;
            evsDetailedResults.ValidationErrorCount = dvtkDetailedResults.ValidationErrorCount;
            evsDetailedResults.ValidationWarningCount = dvtkDetailedResults.ValidationWarningCount;
            evsDetailedResults.ValidationConditionCount = dvtkDetailedResults.ValidationConditionCount;
            evsDetailedResults.ValidationResult = dvtkDetailedResults.ValidationResult;

            // save the evs detailed results file
            String evsDetailedResultsFilename = GetEvsDetailedResultsFilename(resultsOverview.Oid);
            evsDetailedResults.Save(evsDetailedResultsFilename);

            // delete the dvtk detailed results file
            try
            {
                FileInfo dvtkDetailedResultsFileInfo = new FileInfo(dvtkDetailedResultsFilename);
                dvtkDetailedResultsFileInfo.Delete();
            }
            catch (System.Exception)
            {
                // exception thrown if the file is currently being accessed by another process - this will be picked up on the next RemoveCachedData() call.
            }
        }