示例#1
0
        private void OnDestinationResponse(object sender, InProcResponseEventArgs e)
        {
            var handler = this.ResponseReceived;

            if (handler == null)
            {
                this._inboundQueue.Add(e.Data, this._linkedCancellationTokenSource.Token);
                return;
            }

            var eventArgs = new InProcResponseReceivedEventArgs(e.Data);

            handler(this, eventArgs);
            if (eventArgs.ChunkedReceivedData == null)
            {
                this._inboundQueue.Add(e.Data, this._linkedCancellationTokenSource.Token);
            }
            else
            {
                foreach (var data in eventArgs.ChunkedReceivedData)
                {
                    this._inboundQueue.Add(data, this._linkedCancellationTokenSource.Token);
                }
            }
        }
示例#2
0
		private void OnDestinationResponse( object sender, InProcResponseEventArgs e )
		{
			var handler = this.ResponseReceived;

			if ( handler == null )
			{
				this._inboundQueue.Add( e.Data, this._linkedCancellationTokenSource.Token );
				return;
			}

			var eventArgs = new InProcResponseReceivedEventArgs( e.Data );
			handler( this, eventArgs );
			if ( eventArgs.ChunkedReceivedData == null )
			{
				this._inboundQueue.Add( e.Data, this._linkedCancellationTokenSource.Token );
			}
			else
			{
				foreach ( var data in eventArgs.ChunkedReceivedData )
				{
					this._inboundQueue.Add( data, this._linkedCancellationTokenSource.Token );
				}
			}
		}