Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Side by Side Diff: lib/src/delegate/stream_subscription.dart

Issue 1777453002: Modernize the package's style. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Code review changes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/delegate/stream_sink.dart ('k') | lib/src/future_group.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library async.delegate.stream_subscription;
6
7 import 'dart:async'; 5 import 'dart:async';
8 6
9 /// Simple delegating wrapper around a [StreamSubscription]. 7 /// Simple delegating wrapper around a [StreamSubscription].
10 /// 8 ///
11 /// Subclasses can override individual methods. 9 /// Subclasses can override individual methods.
12 class DelegatingStreamSubscription<T> implements StreamSubscription<T> { 10 class DelegatingStreamSubscription<T> implements StreamSubscription<T> {
13 final StreamSubscription _source; 11 final StreamSubscription _source;
14 12
15 /// Create delegating subscription forwarding calls to [sourceSubscription]. 13 /// Create delegating subscription forwarding calls to [sourceSubscription].
16 DelegatingStreamSubscription(StreamSubscription sourceSubscription) 14 DelegatingStreamSubscription(StreamSubscription sourceSubscription)
(...skipping 18 matching lines...) Expand all
35 void resume() { 33 void resume() {
36 _source.resume(); 34 _source.resume();
37 } 35 }
38 36
39 Future cancel() => _source.cancel(); 37 Future cancel() => _source.cancel();
40 38
41 Future asFuture([futureValue]) => _source.asFuture(futureValue); 39 Future asFuture([futureValue]) => _source.asFuture(futureValue);
42 40
43 bool get isPaused => _source.isPaused; 41 bool get isPaused => _source.isPaused;
44 } 42 }
OLDNEW
« no previous file with comments | « lib/src/delegate/stream_sink.dart ('k') | lib/src/future_group.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698