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

Side by Side Diff: lib/src/stream_sink_transformer/stream_transformer_wrapper.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/stream_sink_transformer/handler_transformer.dart ('k') | lib/src/stream_splitter.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.stream_sink_transformer.stream_transformer_wrapper;
6
7 import 'dart:async'; 5 import 'dart:async';
8 6
9 import '../stream_sink_transformer.dart'; 7 import '../stream_sink_transformer.dart';
10 8
11 /// A [StreamSinkTransformer] that wraps a pre-existing [StreamTransformer]. 9 /// A [StreamSinkTransformer] that wraps a pre-existing [StreamTransformer].
12 class StreamTransformerWrapper<S, T> implements StreamSinkTransformer<S, T> { 10 class StreamTransformerWrapper<S, T> implements StreamSinkTransformer<S, T> {
13 /// The wrapped transformer. 11 /// The wrapped transformer.
14 final StreamTransformer<S, T> _transformer; 12 final StreamTransformer<S, T> _transformer;
15 13
16 const StreamTransformerWrapper(this._transformer); 14 const StreamTransformerWrapper(this._transformer);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 _controller.addError(error, stackTrace); 51 _controller.addError(error, stackTrace);
54 } 52 }
55 53
56 Future addStream(Stream<S> stream) => _controller.addStream(stream); 54 Future addStream(Stream<S> stream) => _controller.addStream(stream);
57 55
58 Future close() { 56 Future close() {
59 _controller.close(); 57 _controller.close();
60 return _inner.done; 58 return _inner.done;
61 } 59 }
62 } 60 }
OLDNEW
« no previous file with comments | « lib/src/stream_sink_transformer/handler_transformer.dart ('k') | lib/src/stream_splitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698