public void SetContextAwareActions([NotNull] IEnumerable <IContextAwareAction> actions) { var menu = new MenuDefinition(actions, SupportedScopes); _contextMenu = menu.CreateMenu(); menu.MenuClicked += OnMenuClicked; }
public void SetContextAwareActions([NotNull] IEnumerable <IContextAwareAction> actions) { var menuMitigation = new MenuDefinition(actions, Scope.Mitigation); _mitigationMenu = menuMitigation.CreateMenu(); menuMitigation.MenuClicked += OnMitigationMenuClicked; var menuThreatEventMitigation = new MenuDefinition(actions, Scope.ThreatEventMitigation); _threatEventMitigationMenu = menuThreatEventMitigation.CreateMenu(); menuThreatEventMitigation.MenuClicked += OnThreatEventMitigationMenuClicked; }
public void SetContextAwareActions([NotNull] IEnumerable <IContextAwareAction> actions) { var menuThreatTypes = new MenuDefinition(actions, Scope.ThreatType); _weaknessMenu = menuThreatTypes.CreateMenu(); menuThreatTypes.MenuClicked += OnThreatTypeMenuClicked; var menuThreatTypeMitigation = new MenuDefinition(actions, Scope.ThreatTypeMitigation); _weaknessMitigationMenu = menuThreatTypeMitigation.CreateMenu(); menuThreatTypeMitigation.MenuClicked += OnThreatTypeMitigationMenuClicked; }
public void SetContextAwareActions([NotNull] IEnumerable <IContextAwareAction> actions) { var menuThreatEvents = new MenuDefinition(actions, Scope.ThreatEvent); _threatEventMenu = menuThreatEvents.CreateMenu(); menuThreatEvents.MenuClicked += OnThreatEventMenuClicked; var menuThreatTypes = new MenuDefinition(actions, Scope.ThreatType); _threatTypeMenu = menuThreatTypes.CreateMenu(); menuThreatTypes.MenuClicked += OnThreatTypeMenuClicked; var menuScenario = new MenuDefinition(actions, Scope.ThreatEventScenario); _scenarioMenu = menuScenario.CreateMenu(); menuScenario.MenuClicked += OnScenarioMenuClicked; var menuThreatEventMitigation = new MenuDefinition(actions, Scope.ThreatEventMitigation); _threatEventMitigationMenu = menuThreatEventMitigation.CreateMenu(); menuThreatEventMitigation.MenuClicked += OnThreatEventMitigationMenuClicked; }