Exemplo n.º 1
0
        public static AnalysisSearch.SavedAssessmentSearch createSavedAssessmentSearchObjectFromNormalizedTraces(List<TreeNode> ltnNormalizedTraces)
        {
            //     if (tvTempTreeView.Nodes.Count > 0)
            //     {
            var sasSavedAssessmentSearch = new AnalysisSearch.SavedAssessmentSearch();
            //       foreach (TreeNode tnTreeNode in tvTempTreeView.Nodes)
            DI.log.debug("There are {0} Traces in ltnTraces to process", ltnNormalizedTraces.Count);
            foreach (TreeNode tnTreeNode in ltnNormalizedTraces)
            {
                FindingViewItem fviJoinedFindingViewItem =
                    creator.createJoinedUpFindingViewItemFromTreeNodeWithFindingViewItemAsTags(tnTreeNode);
                if (fviJoinedFindingViewItem != null && fviJoinedFindingViewItem.fFinding != null)
                {
                    var frFindingsResult =
                        new AnalysisSearch.FindingsResult(fviJoinedFindingViewItem.oadO2AssessmentDataOunceV6)
                            {
                                fFinding = fviJoinedFindingViewItem.fFinding,
                                fFile =
                                    fviJoinedFindingViewItem.oadO2AssessmentDataOunceV6.dFindings[
                                    fviJoinedFindingViewItem.fFinding]
                            };
                    sasSavedAssessmentSearch.lfrFindingsResults.Add(frFindingsResult);
                    if (sasSavedAssessmentSearch.lfrFindingsResults.Count % 2500 == 0)
                        DI.log.debug("Create Trace # {0}/{1}", sasSavedAssessmentSearch.lfrFindingsResults.Count, ltnNormalizedTraces.Count);
                }
            }
            return sasSavedAssessmentSearch;

        }
Exemplo n.º 2
0
 private void btCreateAssessmentRunWithSearchResults_Click(object sender, EventArgs e)
 {
     var sasSavedAssessmentSearch = new AnalysisSearch.SavedAssessmentSearch();
     // foreach (o2.analysis.FindingViewItem FindingViewItem in lbSearchResults_Findings.Items)
     // {
     //     o2.analysis.FindingViewItem fviFindingViewItem = (o2.analysis.FindingViewItem)oFindingViewItem;
     //     sasSavedAssessmentSearch.lfrFindingsResults.Add(fviFindingViewItem.frFindingResult);
     // }
     sasSavedAssessmentSearch.lfrFindingsResults = getListOfFindingsResultsFromCurrentListOfViewSearchItems();
     CustomAssessmentFile.saveAssessmentSearchResultsAsNewAssessmentRunFile(sasSavedAssessmentSearch, "",
                                                                            cbCreateFileWithAllTraces.Checked,
                                                                            cbCreateFileWithUniqueTraces.Checked,
                                                                            cbDropDuplicateSmartTraces.Checked,
                                                                            cbIgnoreRootCallInvocation.Checked);
 }
Exemplo n.º 3
0
 public void setSavedAssessmentSearchAndLoadData(AnalysisSearch.SavedAssessmentSearch sasSavedAssessmentSearch)
 {
     this.sasSavedAssessmentSearch = sasSavedAssessmentSearch;
     if (tvSearchFilters.Nodes.Count == 0)
         tvSearchFilters.Nodes.Add("Search Text");
     /*
     if (sasSavedAssessmentSearch.lscSearchCriteria.Count > 0)
     {
         tvSearchFilters.Nodes.Clear();
         //tvSearchFilters.Nodes.Add(sasSavedAssessmentSearch.lscSearchCriteria[sasSavedAssessmentSearch.lscSearchCriteria.Count - 1].stSearchType.ToString());
         tvSearchFilters.Nodes.Add("Search Text");
     }*/
     loadTreeViewWithSearchResults();
 }
Exemplo n.º 4
0
        public AnalysisSearch.SavedAssessmentSearch ExecuteSearch(List<AnalysisSearch.SearchCriteria> lscSearchCriteria)
        {
            if (lbLoadedAssessmentFiles.Items.Count == 0)
            {
                DI.log.error("in ExecuteSearch: There is no assessment file loaded");
                return null;
            }
            else
            {
                var lfadAssessmentData = new List<O2AssessmentData_OunceV6>();
                foreach (object oItem in lbLoadedAssessmentFiles.Items)
                {
                    lfadAssessmentData.Add((O2AssessmentData_OunceV6) oItem);
                }
                var sasSavedAssessmentSearch = new AnalysisSearch.SavedAssessmentSearch();
                sasSavedAssessmentSearch.setTargetO2AssessmentDataList(lfadAssessmentData);

                sasSavedAssessmentSearch.searchUsingCriteria(lscSearchCriteria);
                vars.set_("PreviousSearch", sasSavedAssessmentSearch);

                return sasSavedAssessmentSearch;
            }
        }
Exemplo n.º 5
0
        public void loadAssessmentFileAndShowData(String sAssessmentFileToLoad, String sDefaultSearchCriteriaText)
        {
            sasSavedAssessmentSearch = new AnalysisSearch.SavedAssessmentSearch(sAssessmentFileToLoad);
            sasSavedAssessmentSearch.searchUsingCriteria(sDefaultSearchCriteriaText);

            loadTreeViewWithSearchResults();
        }