override protected void DisposeGC() { sUnZipMap.Remove(mKey); if (mUnZipObject != null) { mUnZipObject.Dispose(); } if (mUpdateObject != null) { mUpdateObject.UnRegToOwner(); } mUpdateObject = null; mFinished = null; mProgress = null; }
public UnZipTask(string _source, string _destination, Action <string> _finished, Action <float> _progress) { try { mKey = _source; mUnZipObject = new UnZipObject(_source, _destination); mFinished = _finished; mProgress = _progress; mUpdateObject = new UpdateNeedDisObject(mKey, Update, Dispose); } catch (Exception _error) { DLog.LogError(_error); } }
override protected void DisposeGC() { sDownLoadMap.Remove(mURL); if (mObject != null) { mObject.Dispose(); } if (mUpdateObject != null) { mUpdateObject.UnRegToOwner(); } mUpdateObject = null; mFinished = null; mProgress = null; }
public UnZipTask(UpdateObjectVector _owner, string _appname, string _source, string _destination, Action <string> _finished, Action <float> _progress) { try { AppName = _appname; mKey = _source; mUnZipObject = new UnZipObject(_source, _destination); mFinished = _finished; mProgress = _progress; mUpdateObject = new UpdateNeedDisObject(AppName, Update, Dispose); mUpdateObject.Owner = _owner; } catch (Exception _error) { DLog.LogError(_error); } }
public HttpData(string _key, string _url, System.Action <string, string, byte[]> _delgate) { mKey = _key; mUrl = _url; mDelgate = _delgate; UpdateObj = new UpdateNeedDisObject("HttpNet", Update, Dispose); Request = (HttpWebRequest)HttpWebRequest.Create(mUrl); Request.Timeout = 10000; IsDone = false; RecBuffer = null; Error = null; ContentLength = 0; DownLoadedLength = 0; }
public DownLoadTask(UpdateObjectVector _owner, string _key, string _sourceurl, string _destination, bool _IsClear, Action <string, string> _finished, Action <long, long, float> _progress) { try { AppName = _key; mURL = _sourceurl; mObject = new DownLoadObject(_sourceurl, _destination, _IsClear); mFinished = _finished; mProgress = _progress; mUpdateObject = new UpdateNeedDisObject(AppName, Update, Dispose); mUpdateObject.Owner = _owner; sDownLoadMap.Add(mURL, this); } catch (Exception _error) { DLog.LogError(_error); } }