void StopDataManager() { lock (syncObj) { if (sendJobManager != null) { sendJobManager.Error -= HandleError; sendJobManager.Success -= HandleSuccess; sendJobManager.Stop(); sendJobManager.Dispose(); sendJobManager = null; } } }
/// <summary> /// /// </summary> void StartDataManager() { StopDataManager(); lock (syncObj) { this.sendJobManager = new SendJobManager(); //イベントの設定 sendJobManager.Error += HandleError; sendJobManager.Success += HandleSuccess; //開始 okCountHttp = 0; okCountLocal = 0; totalCountHttp = 0; totalCountLocal = 0; sendJobManager.Start(); } }