void OnCommServerCallbackHelper_AfterUnsubscribed(IExMonServer4CommsServerCallback callback, object state) { ExCommsServerSubscribeEntityBase callbackEntity = state as ExCommsServerSubscribeEntityBase; if (callbackEntity != null) { string ipAddress = callbackEntity.Entity.IPAddress; if (_commsServerCallbacks.ContainsKey(ipAddress)) { _commsServerCallbacks[ipAddress] = null; } } }
void OnCommServerCallbackHelper_AfterSubscribed(IExMonServer4MonProcessorCallback callback, object state) { ExCommsServerSubscribeEntityBase callbackEntity = state as ExCommsServerSubscribeEntityBase; if (callbackEntity != null) { string ipAddress = callbackEntity.Entity.IPAddress; if (!_monProcessorCallbacks.ContainsKey(ipAddress)) { _monProcessorCallbacks.Add(ipAddress, callback); } } }