public static Delegate CompleteHandle(LuaFunction func) { CompleteHandle d = (param0) => { int top = func.BeginPCall(); IntPtr L = func.GetLuaState(); LuaScriptMgr.PushObject(L, param0); func.PCall(top, 1); func.EndPCall(top); }; return(d); }
/// <summary> /// 下载完成调用,处理文件和调用CompleteHandle /// </summary> protected void Complete() { Utility.FileUtil.MoveFile(SaveFilePathTemp, SaveFilePath); Utility.FileUtil.DeleteFile(ServerFileInfoFilePath); CompleteHandle?.Invoke(SaveFilePath); }