// Method for adding techniques with no subtecniques public void AddMitigationInfo(Technique technique, Dictionary <string, Mitigation> MitigationInfo) { // Creating a new navigation technique object for the technique NTechnique NavigatorTechnique = new NTechnique(technique.GetID(), MitigationInfo); // Adding the technique to the list of processed techniques this.techniques.Add(NavigatorTechnique); }
// Method for adding technique with subtechniques public void AddMitigationInfo(Technique rootTechnique, List <string> subTechniqueIDs, List <Dictionary <string, Mitigation> > subTechniqueResults) { List <string> subTechniquesColors = new List <string>(); // Adding subtechniques foreach (var item in subTechniqueIDs.Zip(subTechniqueResults, Tuple.Create)) { var subTechniqueID = item.Item1; var MitigationInfo = item.Item2; NTechnique subTechnique = new NTechnique(subTechniqueID, MitigationInfo); this.techniques.Add(subTechnique); subTechniquesColors.Add(subTechnique.color); } // Adding root technique NTechnique NavigatorRootTechnique = new NTechnique(rootTechnique.GetID(), subTechniquesColors); this.techniques.Add(NavigatorRootTechnique); }