Beispiel #1
0
        private void RaiseUpdate(SimProperty simProp)
        {
            var actions = Enumerable.Empty <Action <SimProperty> >();

            lock (_propertyUpdateEvents)
            {
                if (_propertyUpdateEvents.ContainsKey(simProp.GetType()))
                {
                    actions = _propertyUpdateEvents[simProp.GetType()];
                }
            }
            foreach (var action in actions)
            {
                action(simProp);
            }
        }
Beispiel #2
0
 private void AddProperty(SimProperty simProp)
 {
     simProp.PropertyChanged += SimPropertyChanged;
     RaiseUpdate(simProp);
 }
Beispiel #3
0
 private void RemoveProperty(SimProperty simProp)
 {
     simProp.PropertyChanged -= SimPropertyChanged;
 }