예제 #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);
            }
        }
예제 #2
0
 private void AddProperty(SimProperty simProp)
 {
     simProp.PropertyChanged += SimPropertyChanged;
     RaiseUpdate(simProp);
 }
예제 #3
0
 private void RemoveProperty(SimProperty simProp)
 {
     simProp.PropertyChanged -= SimPropertyChanged;
 }