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

            Contract.EndContractBlock();

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

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #2
0
		/// <summary>
		///		Raises the <see cref="E:ServerError"/> event.
		/// </summary>
		/// <param name="e">The <see cref="MsgPack.Rpc.Server.RpcServerErrorEventArgs"/> instance containing the event data.</param>
		/// <exception cref="ArgumentNullException">
		///		<paramref name="e"/> is <c>null</c>.
		/// </exception>
		protected virtual void OnServerError( RpcServerErrorEventArgs e )
		{
			if ( e == null )
			{
				throw new ArgumentNullException( "e" );
			}

			Contract.EndContractBlock();

			var handler = Interlocked.CompareExchange( ref this._serverError, null, null );
			if ( handler != null )
			{
				handler( this, e );
			}
		}
 private void OnServerError(object sender, RpcServerErrorEventArgs e)
 {
     this.OnError(new CallbackServerErrorEventArgs(e.Exception, false));
 }
Exemple #4
0
		private void OnServerError( object sender, RpcServerErrorEventArgs e )
		{
			this.OnError( new CallbackServerErrorEventArgs( e.Exception, false ) );
		}