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