Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.async; | 5 part of dart.async; |
| 6 | 6 |
| 7 // ------------------------------------------------------------------- | 7 // ------------------------------------------------------------------- |
| 8 // Core Stream types | 8 // Core Stream types |
| 9 // ------------------------------------------------------------------- | 9 // ------------------------------------------------------------------- |
| 10 | 10 |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1488 | 1488 |
| 1489 /** Close the sink. No further events can be added after closing. */ | 1489 /** Close the sink. No further events can be added after closing. */ |
| 1490 void close(); | 1490 void close(); |
| 1491 } | 1491 } |
| 1492 | 1492 |
| 1493 | 1493 |
| 1494 /** [Stream] wrapper that only exposes the [Stream] interface. */ | 1494 /** [Stream] wrapper that only exposes the [Stream] interface. */ |
| 1495 class StreamView<T> extends Stream<T> { | 1495 class StreamView<T> extends Stream<T> { |
| 1496 final Stream<T> _stream; | 1496 final Stream<T> _stream; |
| 1497 | 1497 |
| 1498 StreamView(this._stream); | 1498 const StreamView(this._stream) : super._internal(); |
|
kevmoo
2016/02/11 21:19:56
Please update changelog, too
Lasse Reichstein Nielsen
2016/02/11 22:04:49
Consider making the public parameter name be "stre
floitsch
2016/02/12 19:29:16
Done.
floitsch
2016/02/12 19:29:16
Done.
| |
| 1499 | 1499 |
| 1500 bool get isBroadcast => _stream.isBroadcast; | 1500 bool get isBroadcast => _stream.isBroadcast; |
| 1501 | 1501 |
| 1502 Stream<T> asBroadcastStream({void onListen(StreamSubscription subscription), | 1502 Stream<T> asBroadcastStream({void onListen(StreamSubscription subscription), |
| 1503 void onCancel(StreamSubscription subscription)}) | 1503 void onCancel(StreamSubscription subscription)}) |
| 1504 => _stream.asBroadcastStream(onListen: onListen, onCancel: onCancel); | 1504 => _stream.asBroadcastStream(onListen: onListen, onCancel: onCancel); |
| 1505 | 1505 |
| 1506 StreamSubscription<T> listen(void onData(T value), | 1506 StreamSubscription<T> listen(void onData(T value), |
| 1507 { Function onError, | 1507 { Function onError, |
| 1508 void onDone(), | 1508 void onDone(), |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1800 class _ControllerEventSinkWrapper<T> implements EventSink<T> { | 1800 class _ControllerEventSinkWrapper<T> implements EventSink<T> { |
| 1801 EventSink _sink; | 1801 EventSink _sink; |
| 1802 _ControllerEventSinkWrapper(this._sink); | 1802 _ControllerEventSinkWrapper(this._sink); |
| 1803 | 1803 |
| 1804 void add(T data) { _sink.add(data); } | 1804 void add(T data) { _sink.add(data); } |
| 1805 void addError(error, [StackTrace stackTrace]) { | 1805 void addError(error, [StackTrace stackTrace]) { |
| 1806 _sink.addError(error, stackTrace); | 1806 _sink.addError(error, stackTrace); |
| 1807 } | 1807 } |
| 1808 void close() { _sink.close(); } | 1808 void close() { _sink.close(); } |
| 1809 } | 1809 } |
| OLD | NEW |