/// <summary>
        /// 填充用户自定义网络错误事件
        /// </summary>
        /// <param name="e">内部事件</param>
        /// <returns>用户自定义网络错误事件</returns>
        public NetworkCustomErrorEventArgs Fill(GameFramework.Network.NetworkCustomErrorEventArgs e)
        {
            NetworkChannel  = e.NetworkChannel;
            CustomErrorData = e.CustomErrorData;

            return(this);
        }
        /// <summary>
        /// 创建用户自定义网络错误事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的用户自定义网络错误事件。</returns>
        public static NetworkCustomErrorEventArgs Create(GameFramework.Network.NetworkCustomErrorEventArgs e)
        {
            NetworkCustomErrorEventArgs networkCustomErrorEventArgs = ReferencePool.Acquire <NetworkCustomErrorEventArgs>();

            networkCustomErrorEventArgs.NetworkChannel  = e.NetworkChannel;
            networkCustomErrorEventArgs.CustomErrorData = e.CustomErrorData;
            return(networkCustomErrorEventArgs);
        }
Ejemplo n.º 3
0
 private void OnNetworkChannelCustomError(NetworkChannelBase networkChannel, object customErrorData)
 {
     if (m_NetworkCustomErrorEventHandler != null)
     {
         lock (m_NetworkCustomErrorEventHandler)
         {
             NetworkCustomErrorEventArgs networkCustomErrorEventArgs = NetworkCustomErrorEventArgs.Create(networkChannel, customErrorData);
             m_NetworkCustomErrorEventHandler(this, networkCustomErrorEventArgs);
             ReferencePool.Release(networkCustomErrorEventArgs);
         }
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 初始化用户自定义网络错误事件的新实例。
 /// </summary>
 /// <param name="e">内部事件。</param>
 public NetworkCustomErrorEventArgs(GameFramework.Network.NetworkCustomErrorEventArgs e)
 {
     NetworkChannel  = e.NetworkChannel;
     CustomErrorData = e.CustomErrorData;
 }
Ejemplo n.º 5
0
 private void OnNetworkCustomError(object sender, GameFramework.Network.NetworkCustomErrorEventArgs e)
 {
     m_EventComponent.Fire(this, NetworkCustomErrorEventArgs.Create(e));
 }
Ejemplo n.º 6
0
 private void OnNetworkCustomError(object sender, GameFramework.Network.NetworkCustomErrorEventArgs e)
 {
     this.m_EventComponent.Fire(this, ReferencePool.Acquire <NetworkCustomErrorEventArgs>().Fill(e));
 }
Ejemplo n.º 7
0
 private void OnNetworkCustomError(object sender, GameFramework.Network.NetworkCustomErrorEventArgs e)
 {
     Log.Warning("OnNetworkCustomError =" + e.CustomErrorData);
     m_EventComponent.Fire(this, ReferencePool.Acquire <NetworkCustomErrorEventArgs>().Fill(e));
 }