示例#1
0
        public IThreatActor AddThreatActor([Required] string name, string description)
        {
            IThreatActor result = new ThreatActor(this, name)
            {
                Description = description
            };

            Add(result);
            RegisterEvents(result);

            return(result);
        }
示例#2
0
        public IThreatActor AddThreatActor(DefaultActor actor)
        {
            IThreatActor result = null;

            if (actor != DefaultActor.Unknown)
            {
                var threatActor = GetThreatActor(actor);
                if (threatActor == null)
                {
                    result = new ThreatActor(this, actor);
                    Add(result);
                    RegisterEvents(result);
                }
            }

            return(result);
        }