示例#1
0
        public static WWWTO UploadFiles(List <WWWInfo> infos, WWWRstDel del, LuaFunction lua)
        {
            WWWTO www = new WWWTO();

            www.mType = WWWType.upload;

            www.mRstDel = del;
            www._setLuaCallback(lua);

            if (null == infos || infos.Count == 0)
            {
                www._callback(-1, "download files info list is null or empty!");
                www.Dispose();
                return(null);
            }
            for (int i = 0; i < infos.Count; i++)
            {
                www.mTotalSize += infos[i].Size;
            }

            www.mList.Clear();
            www.mList.AddRange(infos);
            www.mFialedList.Clear();

            return(www);
        }
示例#2
0
        protected override void _disposUnmananged()
        {
            if (null != mLocalLua)
            {
                mLocalLua.Dispose();
                mLocalLua = null;
            }

            if (null != mServLua)
            {
                mServLua.Dispose();
                mServLua = null;
            }

            if (null != mDownloader)
            {
                mDownloader.Dispose();
                mDownloader = null;
            }
        }