コード例 #1
0
        /// <summary>
        ///		Raises the <see cref="E:ClientError"/> event.
        /// </summary>
        /// <param name="e">The <see cref="MsgPack.Rpc.Server.RpcClientErrorEventArgs"/> instance containing the event data.</param>
        /// <exception cref="ArgumentNullException">
        ///		<paramref name="e"/> is <c>null</c>.
        /// </exception>
        protected virtual void OnClientError(RpcClientErrorEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            Contract.EndContractBlock();

            var handler = Interlocked.CompareExchange(ref this._clientError, null, null);

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
ファイル: RpcServer.cs プロジェクト: Indifer/Test
		/// <summary>
		///		Raises the <see cref="E:ClientError"/> event.
		/// </summary>
		/// <param name="e">The <see cref="MsgPack.Rpc.Server.RpcClientErrorEventArgs"/> instance containing the event data.</param>
		/// <exception cref="ArgumentNullException">
		///		<paramref name="e"/> is <c>null</c>.
		/// </exception>
		protected virtual void OnClientError( RpcClientErrorEventArgs e )
		{
			if ( e == null )
			{
				throw new ArgumentNullException( "e" );
			}

			Contract.EndContractBlock();

			var handler = Interlocked.CompareExchange( ref this._clientError, null, null );
			if ( handler != null )
			{
				handler( this, e );
			}
		}
コード例 #3
0
 private void OnClientError(object sender, RpcClientErrorEventArgs e)
 {
     this.OnError(new CallbackServerErrorEventArgs(e.RpcError.ToException(), true));
 }
コード例 #4
0
ファイル: CallbackServer.cs プロジェクト: Indifer/Test
		private void OnClientError( object sender, RpcClientErrorEventArgs e )
		{
			this.OnError( new CallbackServerErrorEventArgs( e.RpcError.ToException(), true ) );
		}