コード例 #1
0
 // creates a new Artifacts Object file
 public static IAnalysisArtifacts createAnalysisArtifact(string workflowName,string assessmentFile, string targetFolder)
 {    		
     var analysisArtifacts = new KAnalysisArtifacts(workflowName);
     analysisArtifacts.assessmentFilesOrFolderToLoad.Add(assessmentFile);            
     analysisArtifacts.targetFolder = targetFolder;        	
     return analysisArtifacts;
                 
 }
コード例 #2
0
ファイル: Analysis_WorkFlow.cs プロジェクト: pusp/o2platform
        public string start(string folderWithAssessments, string folderWithProjectFiles, string targetFolder)
        {
            var projectName = Path.GetFileName(folderWithAssessments);  // get the project name from the name of the folderWithAssessments
            var analysisArtifacts = new KAnalysisArtifacts(projectName);

            analysisArtifacts.assessmentFilesOrFolderToLoad.Add(folderWithAssessments);
            if (false == string.IsNullOrEmpty(folderWithProjectFiles))
                analysisArtifacts.projectFilesOrFolder.Add(folderWithProjectFiles);
            analysisArtifacts.targetFolder = targetFolder;            
            return start(analysisArtifacts);            
        }
コード例 #3
0
 public static bool save(KAnalysisArtifacts analysisArtifacts, string targetFile)
 {
     try
     {
         Serialize.createSerializedXmlFileFromObject(analysisArtifacts, targetFile);
         return(true);
     }
     catch (Exception ex)
     {
         PublicDI.log.error("KAnalysisArtifacts.save :{0}", ex.Message);
         return(false);
     }
 }
コード例 #4
0
 // run sequence of filters on findings (note that (if 4th param == true) saveQuery will remove the matched
 // findings from tracesToFilter
 public void task2_filterFindings(KAnalysisArtifacts analysisArtifacts, List<IO2Finding> tracesToFilter, string targetFolder, string fileName)
 {			                       
     foreach(var sourceSink in analysisArtifacts.phase_3.task2_sourceSink)
     {
         XUtils_Analysis.saveQuery(tracesToFilter, targetFolder, fileName,sourceSink.Source, sourceSink.Sink, sourceSink.RemoveMatches);	
     }            					
     // save what was left (i.e. findings that didn't match the above filters) in a separate file
     if (tracesToFilter.Count > 0)
     {
         O2Cmd.log.write("After task2 filters there were {0} findings that matched no filter", tracesToFilter.Count);
         var targetFile = Path.Combine(targetFolder,"__NO FILTER__" + " - " + fileName + ".ozasmt");
         XUtils_Findings_v0_1.saveFindings(tracesToFilter, targetFile);
     }
 }
コード例 #5
0
 public static bool save(KAnalysisArtifacts analysisArtifacts, string targetFile)
 {
     try
     {
         Serialize.createSerializedXmlFileFromObject(analysisArtifacts, targetFile);
         return true;
     }
     catch (Exception ex)
     {
         PublicDI.log.error("KAnalysisArtifacts.save :{0}", ex.Message);
         return false;
     }
 }