/// <summary> /// Disposes of or finalises the object. /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { if (disposing) { if (!Disposed) { if (_PrivateHeartbeat != null) { _PrivateHeartbeat.FastTick -= Heartbeat_FastTimerTicked; _PrivateHeartbeat.SlowTick -= Heartbeat_SlowTimerTicked; _PrivateHeartbeat.Dispose(); } Disposed = true; } } }
/// <summary> /// See interface docs. /// </summary> public void Shutdown() { if (_OnlineLookupCache != null) { _OnlineLookupCache.Enabled = false; } if (_BackgroundThreadMessageQueue != null) { _BackgroundThreadMessageQueue.Dispose(); } if (_HeartbeatService != null) { _HeartbeatService.SlowTick -= Heartbeat_SlowTick; _HeartbeatService.Dispose(); } EndSession(); }
public void Dispose() { foreach (var disposable in _handlers) { if (disposable != null) { disposable.Dispose(); } } _handlers.Clear(); if (_heartbeatService != null) { _heartbeatService.Stop(); _heartbeatService.Dispose(); _heartbeatService = null; } _bus = null; _eventProcessingBus = null; }
public void Dispose() { gateway.Dispose(); voiceClient.Dispose(); heartbeatService.Dispose(); }
public void Dispose() { voiceGateway.Dispose(); heartbeatService.Dispose(); udpClient.Dispose(); }