Example #1
0
 internal _StreamHandlerTransformer(
     _stream._TransformDataHandler <S, T> handleData = null,
     _stream._TransformErrorHandler <T> handleError  = null,
     _stream._TransformDoneHandler <T> handleDone    = null)
     : base((EventSink <T> outputSink) => {
     return(new _HandlerEventSink <S, T>(
                handleData, handleError, handleDone, outputSink));
 }) {
 }
Example #2
0
 internal _HandlerEventSink(
     _stream._TransformDataHandler <S, T> _handleData, _stream._TransformErrorHandler <T> _handleError,
     _stream._TransformDoneHandler <T> _handleDone, EventSink <T> _sink)
 {
     this._handleData  = _handleData;
     this._handleError = _handleError;
     this._handleDone  = _handleDone;
     this._sink        = _sink;
     if (_sink == null)
     {
         throw new Exception("The provided sink must not be null.");
     }
 }