private void LoadNodesList([NotNull] Attack_Pattern_Catalog catalog) { foreach (var view in catalog.Views) { _views.Add(view.Name, view.ID); } foreach (var category in catalog.Categories) { _nodes.Add(category.ID, new ThreatSourceNode(this, category)); } foreach (var attack in catalog.Attack_Patterns) { try { _nodes.Add(attack.ID, new ThreatSourceNode(this, attack)); } catch (Exception e) { Console.WriteLine(e); throw; } } }
public ThreatSource([NotNull] Attack_Pattern_Catalog catalog) { CatalogName = catalog.Catalog_Name; CatalogVersion = catalog.Catalog_Version; CatalogDate = catalog.Catalog_Date; LoadNodesList(catalog); }
public CapecEngine([Required] string xml) { _catalog = Attack_Pattern_Catalog.Deserialize(xml); }