private void CreateHttperManamger() { this.DisposeHttpManager(); httpManager = new HttperManager(); httpManager.ProcessItemChanged += httpManager_ProcessItemChanged; httpManager.ProcessCompleted += httpManager_ProcessCompleted; httpManager.ReconnectChanged += httpManager_ReconnectChanged; }
private void DisposeHttpManager() { if (null != httpManager) { httpManager.ProcessItemChanged -= httpManager_ProcessItemChanged; httpManager.ProcessCompleted -= httpManager_ProcessCompleted; httpManager.ReconnectChanged -= httpManager_ReconnectChanged; httpManager.Dispose(); httpManager = null; } this.StopReconnectTimer(); this.StopSpendTimer(); }