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

Side by Side Diff: lib/stream_channel.dart

Issue 1643843002: Add a document-by-document JSON transformer. (Closed) Base URL: git@github.com:dart-lang/stream_channel.git@master
Patch Set: Created 4 years, 10 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/json_document_transformer.dart ('k') | test/json_document_transformer_test.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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'src/stream_channel_transformer.dart'; 7 import 'src/stream_channel_transformer.dart';
8 8
9 export 'src/delegating_stream_channel.dart'; 9 export 'src/delegating_stream_channel.dart';
10 export 'src/isolate_channel.dart'; 10 export 'src/isolate_channel.dart';
11 export 'src/json_document_transformer.dart';
11 export 'src/multi_channel.dart'; 12 export 'src/multi_channel.dart';
12 export 'src/stream_channel_completer.dart'; 13 export 'src/stream_channel_completer.dart';
13 export 'src/stream_channel_transformer.dart'; 14 export 'src/stream_channel_transformer.dart';
14 15
15 /// An abstract class representing a two-way communication channel. 16 /// An abstract class representing a two-way communication channel.
16 /// 17 ///
17 /// Users should consider the [stream] emitting a "done" event to be the 18 /// Users should consider the [stream] emitting a "done" event to be the
18 /// canonical indicator that the channel has closed. If they wish to close the 19 /// canonical indicator that the channel has closed. If they wish to close the
19 /// channel, they should close the [sink]—canceling the stream subscription is 20 /// channel, they should close the [sink]—canceling the stream subscription is
20 /// not sufficient. Protocol errors may be emitted through the stream or through 21 /// not sufficient. Protocol errors may be emitted through the stream or through
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 /// [stream] and [sink]. 93 /// [stream] and [sink].
93 abstract class StreamChannelMixin<T> implements StreamChannel<T> { 94 abstract class StreamChannelMixin<T> implements StreamChannel<T> {
94 void pipe(StreamChannel<T> other) { 95 void pipe(StreamChannel<T> other) {
95 stream.pipe(other.sink); 96 stream.pipe(other.sink);
96 other.stream.pipe(sink); 97 other.stream.pipe(sink);
97 } 98 }
98 99
99 StreamChannel transform(StreamChannelTransformer<dynamic, T> transformer) => 100 StreamChannel transform(StreamChannelTransformer<dynamic, T> transformer) =>
100 transformer.bind(this); 101 transformer.bind(this);
101 } 102 }
OLDNEW
« no previous file with comments | « lib/src/json_document_transformer.dart ('k') | test/json_document_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698