public void ForwardOnNext(int value) { _parent._consumer.ForwardOnNext(value); if (_errorReenter) { HalfSerializer.ForwardOnError(this, X, ref _parent._wip, ref _parent._error); } else { HalfSerializer.ForwardOnCompleted(this, ref _parent._wip, ref _parent._error); } }
public void ForwardOnNext(int value) { parent.consumer.ForwardOnNext(value); if (errorReenter) { HalfSerializer.ForwardOnError(this, x, ref parent.wip, ref parent.error); } else { HalfSerializer.ForwardOnCompleted(this, ref parent.wip, ref parent.error); } }
public void HalfSerializer_OnError() { var ex = new InvalidOperationException(); HalfSerializer.ForwardOnError(_consumer, ex, ref _wip, ref _error); Assert.Equal(1, _wip); Assert.Equal(_error, ExceptionHelper.Terminated); HalfSerializer.ForwardOnNext(_consumer, 2, ref _wip, ref _error); Assert.Equal(0, _consumer.Items.Count); Assert.Equal(0, _consumer.Done); Assert.Equal(ex, _consumer.Exc); }
public void HalfSerializer_OnError() { var ex = new InvalidOperationException(); HalfSerializer.ForwardOnError(consumer, ex, ref wip, ref error); Assert.Equal(1, wip); Assert.Equal(error, ExceptionHelper.Terminated); HalfSerializer.ForwardOnNext(consumer, 2, ref wip, ref error); Assert.Equal(0, consumer.items.Count); Assert.Equal(0, consumer.done); Assert.Equal(ex, consumer.exc); }
public void HalfSerializer_OnCompleted_Ignore_Further_Events() { HalfSerializer.ForwardOnCompleted(_consumer, ref _wip, ref _error); Assert.Equal(1, _wip); Assert.Equal(_error, ExceptionHelper.Terminated); HalfSerializer.ForwardOnNext(_consumer, 2, ref _wip, ref _error); var ex2 = new NotSupportedException(); HalfSerializer.ForwardOnError(_consumer, ex2, ref _wip, ref _error); HalfSerializer.ForwardOnCompleted(_consumer, ref _wip, ref _error); Assert.Equal(0, _consumer.Items.Count); Assert.Equal(1, _consumer.Done); Assert.Null(_consumer.Exc); }
public void HalfSerializer_OnError_Ignore_Further_Events() { var ex = new InvalidOperationException(); HalfSerializer.ForwardOnError(consumer, ex, ref wip, ref error); Assert.Equal(1, wip); Assert.Equal(error, ExceptionHelper.Terminated); HalfSerializer.ForwardOnNext(consumer, 2, ref wip, ref error); var ex2 = new NotSupportedException(); HalfSerializer.ForwardOnError(consumer, ex2, ref wip, ref error); HalfSerializer.ForwardOnCompleted(consumer, ref wip, ref error); Assert.Equal(0, consumer.items.Count); Assert.Equal(0, consumer.done); Assert.Equal(ex, consumer.exc); }
public void OnError(Exception error) { HalfSerializer.ForwardOnError(_parent, error, ref _parent._halfSerializer, ref _parent._error); }
public override void OnError(Exception ex) { HalfSerializer.ForwardOnError(this, ex, ref _halfSerializer, ref _error); }
public void OnError(Exception error) { HalfSerializer.ForwardOnError(this, error, ref _halfSerializer, ref _error); }
private void HandlerError(Exception error) { HalfSerializer.ForwardOnError(this, error, ref _halfSerializer, ref _error); }
internal void HandlerError(Exception error) { HalfSerializer.ForwardOnError(this, error, ref halfSerializer, ref this.error); }