コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        public ThreatSource([NotNull] Attack_Pattern_Catalog catalog)
        {
            CatalogName    = catalog.Catalog_Name;
            CatalogVersion = catalog.Catalog_Version;
            CatalogDate    = catalog.Catalog_Date;

            LoadNodesList(catalog);
        }
コード例 #3
0
 public CapecEngine([Required] string xml)
 {
     _catalog = Attack_Pattern_Catalog.Deserialize(xml);
 }