Esempio n. 1
0
 public void Dispose()
 {
     if (_link?.DataFlow is IDataFlow flow)
     {
         ((INotifyPropertyChanged)flow).PropertyChanged -= OnPropertyChanged;
         _link.PropertyValueChanged        -= OnLinkPropertyValueChanged;
         _link.DataFlow.ThreatEventAdded   -= ThreatEventsChanged;
         _link.DataFlow.ThreatEventRemoved -= ThreatEventsChanged;
         _threatsMarker.ThreatEventClicked -= OnThreatEventClicked;
         _threatsMarker.Dispose();
     }
 }
Esempio n. 2
0
        public void Dispose()
        {
            if (_shape?.Identity is IEntity entity)
            {
                entity.ImageChanged -= OnEntityImageChanged;

                _diagramMarker.DiagramClicked -= OnDiagramClicked;
                _diagramMarker.Dispose();

                _threatsMarker.ThreatEventClicked -= OnThreatEventClicked;
                _threatsMarker.Dispose();

                ((INotifyPropertyChanged)entity).PropertyChanged -= OnPropertyChanged;
            }
        }