예제 #1
0
        public override StreamSubscription <T> listen(Action <T> onData,
                                                      Action <object, string> onError = null, Action onDone = null, bool cancelOnError = false)
        {
            //cancelOnError = cancelOnError;
            StreamSubscription <T> result = _onListen(_stream, cancelOnError);

            result.onData(onData);
            result.onError(onError);
            result.onDone(onDone);
            return(result);
        }
예제 #2
0
 public override void onError(Action <object, string> handleError)
 {
     _source.onError(handleError);
     if (handleError == null)
     {
         _handleError = null;
     }
     else
     {
         _handleError = _zone
                        .registerBinaryCallback((a, b) => {
             handleError(a, (string)b);
             return(null);
         });
     }
 }