addMiddleware method

  1. @override
DartnessPipeline addMiddleware(
  1. DartnessMiddleware dartnessMiddleware
)
override

Returns a new DartnessPipeline with dartnessMiddleware added to the existing set of DartnessMiddleware.

Implementation

@override
DartnessPipeline addMiddleware(final DartnessMiddleware dartnessMiddleware) {
  final shelfMiddleware = DartnessMiddlewareShelf(dartnessMiddleware);
  final pipeline = _pipeline.addMiddleware(shelfMiddleware.middleware);
  return DefaultDartnessPipeline(pipeline: pipeline);
}