|
|
|
|
|
|
|
|
|
|
public virtual StreamSink<T> sink { get; } |
|
|
|
|
|
|
|
public bool isClosed { get; } |
|
|
|
public virtual bool isClosed { get; } |
|
|
|
public bool isPaused { get; } |
|
|
|
public virtual bool isPaused { get; } |
|
|
|
public bool hasListener { get; } |
|
|
|
public virtual bool hasListener { get; } |
|
|
|
|
|
|
|
// public abstract void add(T evt);
|
|
|
|
//
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** Whether there is an active listener. */ |
|
|
|
bool hasListener { |
|
|
|
public override bool hasListener { |
|
|
|
get => (_state & _STATE_SUBSCRIBED) != 0; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
abstract class _SyncStreamControllerDispatch<T> |
|
|
|
: _StreamController<T>, SynchronousStreamController<T> { |
|
|
|
int _state { get; set; } |
|
|
|
internal virtual int _state { get; set; } |
|
|
|
|
|
|
|
public override void _sendData(T data) { |
|
|
|
_subscription._add(data); |
|
|
|
|
|
|
this._controller = _controller; |
|
|
|
} |
|
|
|
|
|
|
|
StreamSubscription<T> _createSubscription( |
|
|
|
internal override StreamSubscription<T> _createSubscription( |
|
|
|
Action<T> onData, Action<object, string> onError, Action onDone, bool cancelOnError) => |
|
|
|
_controller._subscribe(onData, onError, onDone, cancelOnError); |
|
|
|
|
|
|
|