public void Dispose() { this.isDisposed = true; this.client.Close(); if (this.timer != null) { this.timer.Stop(); this.timer.Dispose(); this.timer = null; } }