public bool Remove(CustomObject customObject) { bool result; if (customObject is DynamicCustomObject) { result = _dynamicCustomObjects.Remove((DynamicCustomObject)customObject); } else { result = _staticCustomObjects.Remove(customObject); } customObject.UnInitialize(); _pane.Invalidate(); return(result); }
ResponseMessage Receive(SubscribeToSourceAccountsUpdatesMessage message) { lock (this) { if (message.Subscribe) { _subscribers.Add(message.TransportInfo); } else { _subscribers.Remove(message.TransportInfo); } } return(new ResponseMessage(true)); }
/// <summary> /// /// </summary> public bool RemoveOnlineEntrySource(OnlineEntrySource source) { lock (this) { if (_onlineEntrySources.Remove(source) == false) { return(false); } } if (OnlineEntrySourceRemovedEvent != null) { OnlineEntrySourceRemovedEvent(this, source); } return(true); }
public void RemoveIndicator(Indicator indicator) { indicator.UnInitialize(); bool removeResult; lock (this) { removeResult = _indicators.Remove(indicator); } if (IndicatorUnInitializedEvent != null) { IndicatorUnInitializedEvent(this, indicator); } if (removeResult && IndicatorRemovedEvent != null) { IndicatorRemovedEvent(this, indicator); } }