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

Side by Side Diff: lib/src/pipeline.dart

Issue 1583683002: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/shelf@master
Patch Set: Created 4 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 | « lib/src/middleware.dart ('k') | lib/src/request.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 shelf.pipeline;
6
7 import 'handler.dart'; 5 import 'handler.dart';
8 import 'middleware.dart'; 6 import 'middleware.dart';
9 7
10 /// A helper that makes it easy to compose a set of [Middleware] and a 8 /// A helper that makes it easy to compose a set of [Middleware] and a
11 /// [Handler]. 9 /// [Handler].
12 /// 10 ///
13 /// var handler = const Pipeline() 11 /// var handler = const Pipeline()
14 /// .addMiddleware(loggingMiddleware) 12 /// .addMiddleware(loggingMiddleware)
15 /// .addMiddleware(cachingMiddleware) 13 /// .addMiddleware(cachingMiddleware)
16 /// .addHandler(application); 14 /// .addHandler(application);
(...skipping 19 matching lines...) Expand all
36 /// [Request] if all of the middleware in the pipeline have passed the request 34 /// [Request] if all of the middleware in the pipeline have passed the request
37 /// through. 35 /// through.
38 Handler addHandler(Handler handler) { 36 Handler addHandler(Handler handler) {
39 if (_middleware == null) return handler; 37 if (_middleware == null) return handler;
40 return _parent.addHandler(_middleware(handler)); 38 return _parent.addHandler(_middleware(handler));
41 } 39 }
42 40
43 /// Exposes this pipeline of [Middleware] as a single middleware instance. 41 /// Exposes this pipeline of [Middleware] as a single middleware instance.
44 Middleware get middleware => addHandler; 42 Middleware get middleware => addHandler;
45 } 43 }
OLDNEW
« no previous file with comments | « lib/src/middleware.dart ('k') | lib/src/request.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698