/// <summary>
        ///		Raises <see cref="ClientShutdown"/> event.
        /// </summary>
        /// <param name="e">The <see cref="MsgPack.Rpc.Server.Protocols.ClientShutdownEventArgs"/> instance containing the event data.</param>
        /// <exception cref="ArgumentNullException">
        ///		<paramref name="e"/> is <c>null</c>.
        /// </exception>
        protected virtual void OnClientShutdown(ClientShutdownEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            Contract.EndContractBlock();

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

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
		/// <summary>
		///		Raises <see cref="ClientShutdown"/> event.
		/// </summary>
		/// <param name="e">The <see cref="MsgPack.Rpc.Server.Protocols.ClientShutdownEventArgs"/> instance containing the event data.</param>
		/// <exception cref="ArgumentNullException">
		///		<paramref name="e"/> is <c>null</c>.
		/// </exception>
		protected virtual void OnClientShutdown( ClientShutdownEventArgs e )
		{
			if ( e == null )
			{
				throw new ArgumentNullException( "e" );
			}

			Contract.EndContractBlock();

			var handler = Interlocked.CompareExchange( ref this._clientShutdown, null, null );
			if ( handler != null )
			{
				handler( this, e );
			}
		}
Пример #3
0
 private void OnTransportClientShutdown(object sender, ClientShutdownEventArgs e)
 {
     this.OnClientShutdown(e);
 }