/// <summary> /// 初始化 Web 请求成功事件的新实例。 /// </summary> /// <param name="e">内部事件。</param> public WebRequestSuccessEventArgs(GameFramework.WebRequest.WebRequestSuccessEventArgs e) { WWWFormInfo wwwFormInfo = (WWWFormInfo)e.UserData; SerialId = e.SerialId; WebRequestUri = e.WebRequestUri; m_WebResponseBytes = e.GetWebResponseBytes(); UserData = wwwFormInfo.UserData; }
/// <summary> /// 创建 Web 请求成功事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>创建的 Web 请求成功事件。</returns> public static WebRequestSuccessEventArgs Create(GameFramework.WebRequest.WebRequestSuccessEventArgs e) { WWWFormInfo wwwFormInfo = (WWWFormInfo)e.UserData; WebRequestSuccessEventArgs webRequestSuccessEventArgs = ReferencePool.Acquire <WebRequestSuccessEventArgs>(); webRequestSuccessEventArgs.SerialId = e.SerialId; webRequestSuccessEventArgs.WebRequestUri = e.WebRequestUri; webRequestSuccessEventArgs.m_WebResponseBytes = e.GetWebResponseBytes(); webRequestSuccessEventArgs.UserData = wwwFormInfo.UserData; ReferencePool.Release(wwwFormInfo); return(webRequestSuccessEventArgs); }
/// <summary> /// 填充 Web 请求成功事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>Web 请求成功事件。</returns> public WebRequestSuccessEventArgs Fill(GameFramework.WebRequest.WebRequestSuccessEventArgs e) { WWWFormInfo wwwFormInfo = (WWWFormInfo)e.UserData; SerialId = e.SerialId; WebRequestUri = e.WebRequestUri; m_WebResponseBytes = e.GetWebResponseBytes(); UserData = wwwFormInfo.UserData; ReferencePool.Release(wwwFormInfo); return(this); }