private void OnCheckerResourceCheckComplete(int removedCount, int updateCount, long updateTotalLength, long updateTotalZipLength) { m_VersionListProcessor.VersionListUpdateSuccess -= OnVersionListProcessorUpdateSuccess; m_VersionListProcessor.VersionListUpdateFailure -= OnVersionListProcessorUpdateFailure; m_VersionListProcessor.Shutdown(); m_VersionListProcessor = null; m_UpdateVersionListCallbacks = null; m_ResourceChecker.ResourceNeedUpdate -= OnCheckerResourceNeedUpdate; m_ResourceChecker.ResourceCheckComplete -= OnCheckerResourceCheckComplete; m_ResourceChecker.Shutdown(); m_ResourceChecker = null; m_ResourceUpdater.CheckResourceComplete(removedCount > 0); if (updateCount <= 0) { m_ResourceUpdater.ResourceUpdateStart -= OnUpdaterResourceUpdateStart; m_ResourceUpdater.ResourceUpdateChanged -= OnUpdaterResourceUpdateChanged; m_ResourceUpdater.ResourceUpdateSuccess -= OnUpdaterResourceUpdateSuccess; m_ResourceUpdater.ResourceUpdateFailure -= OnUpdaterResourceUpdateFailure; m_ResourceUpdater.ResourceUpdateAllComplete -= OnUpdaterResourceUpdateAllComplete; m_ResourceUpdater.Shutdown(); m_ResourceUpdater = null; m_UpdateFileCache = null; if (m_DecompressCache != null) { m_DecompressCache.Dispose(); m_DecompressCache = null; } } m_CheckResourcesCompleteCallback(updateCount > 0, removedCount, updateCount, updateTotalLength, updateTotalZipLength); m_CheckResourcesCompleteCallback = null; }
private void OnCheckerResourceCheckComplete(int removedCount, int updateCount, int updateTotalLength, int updateTotalZipLength) { m_VersionListProcessor.VersionListUpdateSuccess -= OnVersionListProcessorUpdateSuccess; m_VersionListProcessor.VersionListUpdateFailure -= OnVersionListProcessorUpdateFailure; m_VersionListProcessor.Shutdown(); m_VersionListProcessor = null; m_ResourceChecker.ResourceNeedUpdate -= OnCheckerResourceNeedUpdate; m_ResourceChecker.ResourceCheckComplete -= OnCheckerResourceCheckComplete; m_ResourceChecker.Shutdown(); m_ResourceChecker = null; m_ResourceUpdater.CheckResourceComplete(removedCount > 0); if (updateCount <= 0) { m_ResourceUpdater.ResourceUpdateStart -= OnUpdaterResourceUpdateStart; m_ResourceUpdater.ResourceUpdateChanged -= OnUpdaterResourceUpdateChanged; m_ResourceUpdater.ResourceUpdateSuccess -= OnUpdaterResourceUpdateSuccess; m_ResourceUpdater.ResourceUpdateFailure -= OnUpdaterResourceUpdateFailure; m_ResourceUpdater.ResourceUpdateAllComplete -= OnUpdaterResourceUpdateAllComplete; m_ResourceUpdater.Shutdown(); m_ResourceUpdater = null; } if (m_ResourceCheckCompleteEventHandler != null) { m_ResourceCheckCompleteEventHandler(this, new ResourceCheckCompleteEventArgs(removedCount, updateCount, updateTotalLength, updateTotalZipLength)); } }
private void OnCheckerResourceCheckComplete(int removedCount, int updateCount) { m_VersionListProcessor.VersionListUpdateSuccess -= OnVersionListProcessorUpdateSuccess; m_VersionListProcessor.Shutdown(); m_VersionListProcessor = null; m_ResourceChecker.ResourceNeedComplete -= OnCheckerResourceNeedUpdate; m_ResourceChecker.ResourceCheckComplete -= OnCheckerResourceCheckComplete; m_ResourceChecker.Shutdown(); m_ResourceChecker = null; m_ResourceUpdater.CheckResourceComplete(removedCount > 0); if (updateCount < 0) { m_ResourceUpdater.ResourceUpdateAllComplete -= OnUpdateResourceUpdateAllComplete; m_ResourceUpdater.Shutdown(); m_ResourceUpdater = null; } m_ResourceCheckCompleteEventHandler(this, new ResourceCheckCompleteEventArgs(removedCount, updateCount)); }