コード例 #1
0
        /// <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;
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
        /// <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);
        }