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

Side by Side Diff: sdk/lib/async/stream_transformers.dart

Issue 2655883002: fix spelling in core libraries (Closed)
Patch Set: while I’m at it… Created 3 years, 11 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 | « sdk/lib/async/stream.dart ('k') | sdk/lib/collection/set.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) 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 * Wraps an [_EventSink] so it exposes only the [EventSink] interface. 8 * Wraps an [_EventSink] so it exposes only the [EventSink] interface.
9 */ 9 */
10 class _EventSinkWrapper<T> implements EventSink<T> { 10 class _EventSinkWrapper<T> implements EventSink<T> {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 /// A closure mapping a stream and cancelOnError to a StreamSubscription. 264 /// A closure mapping a stream and cancelOnError to a StreamSubscription.
265 typedef StreamSubscription<T> _SubscriptionTransformer<S, T>( 265 typedef StreamSubscription<T> _SubscriptionTransformer<S, T>(
266 Stream<S> stream, bool cancelOnError); 266 Stream<S> stream, bool cancelOnError);
267 267
268 /** 268 /**
269 * A [StreamTransformer] that minimizes the number of additional classes. 269 * A [StreamTransformer] that minimizes the number of additional classes.
270 * 270 *
271 * Instead of implementing three classes: a [StreamTransformer], a [Stream] 271 * Instead of implementing three classes: a [StreamTransformer], a [Stream]
272 * (as the result of a `bind` call) and a [StreamSubscription] (which does the 272 * (as the result of a `bind` call) and a [StreamSubscription] (which does the
273 * actual work), this class only requires a fincution that is invoked when the 273 * actual work), this class only requires a function that is invoked when the
274 * last bit (the subscription) of the transformer-workflow is needed. 274 * last bit (the subscription) of the transformer-workflow is needed.
275 * 275 *
276 * The given transformer function maps from Stream and cancelOnError to a 276 * The given transformer function maps from Stream and cancelOnError to a
277 * `StreamSubscription`. As such it can also act on `cancel` events, making it 277 * `StreamSubscription`. As such it can also act on `cancel` events, making it
278 * fully general. 278 * fully general.
279 */ 279 */
280 class _StreamSubscriptionTransformer<S, T> implements StreamTransformer<S, T> { 280 class _StreamSubscriptionTransformer<S, T> implements StreamTransformer<S, T> {
281 final _SubscriptionTransformer<S, T> _transformer; 281 final _SubscriptionTransformer<S, T> _transformer;
282 282
283 const _StreamSubscriptionTransformer(this._transformer); 283 const _StreamSubscriptionTransformer(this._transformer);
(...skipping 20 matching lines...) Expand all
304 void onDone(), 304 void onDone(),
305 bool cancelOnError }) { 305 bool cancelOnError }) {
306 cancelOnError = identical(true, cancelOnError); 306 cancelOnError = identical(true, cancelOnError);
307 StreamSubscription<T> result = _transformer(_stream, cancelOnError); 307 StreamSubscription<T> result = _transformer(_stream, cancelOnError);
308 result.onData(onData); 308 result.onData(onData);
309 result.onError(onError); 309 result.onError(onError);
310 result.onDone(onDone); 310 result.onDone(onDone);
311 return result; 311 return result;
312 } 312 }
313 } 313 }
OLDNEW
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/collection/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698