Example #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public SuperPoolClients()
 {
     #if Matrix_Diagnostics
     InstanceMonitor = new InstanceMonitor(this);
     #endif
     _proxyTypeManager = new ProxyTypeManager();
 }
Example #2
0
        public virtual void Dispose()
        {
            ProxyTypeManager manager = _proxyTypeManager;
            if (manager != null)
            {
                manager.Dispose();
                _proxyTypeManager = null;
            }

            IMessageBus messageBus = _messageBus;
            _messageBus = null;

            if (messageBus != null)
            {
                messageBus.ClientAddedEvent -= new MessageBusClientUpdateDelegate(_messageBus_ClientAddedEvent);
                messageBus.ClientRemovedEvent -= new MessageBusClientRemovedDelegate(_messageBus_ClientRemovedEvent);
                messageBus.ClientUpdateEvent -= new MessageBusClientUpdateDelegate(_messageBus_ClientUpdateEvent);

                messageBus.Dispose();
            }
        }