public void UnRegisterForMessage(ISubscibeMessage subsciber, EapiDataTypes messageType) { if (SubscriberDic == null) { return; } lock (_subscriberSync) { if (SubscriberDic.ContainsKey(messageType) && SubscriberDic[messageType].Contains(subsciber)) { SubscriberDic[messageType].Remove(subsciber); } } }
public void RegisterForMessage(ISubscibeMessage subsciber, EapiDataTypes messageType) { if (SubscriberDic == null) { SubscriberDic = new Dictionary <EapiDataTypes, List <ISubscibeMessage> >(); } lock (_subscriberSync) { if (SubscriberDic.ContainsKey(messageType)) { SubscriberDic[messageType].Add(subsciber); } else { var subsciberList = new List <ISubscibeMessage> { subsciber }; SubscriberDic[messageType] = subsciberList; } } }
public EndAsynchData(EapiDataTypes receivedApiDataType) { ReceivedApiDataType = receivedApiDataType; }