enforce method

void enforce(
  1. Middleware<T> beforeMiddleware,
  2. Middleware<T> middleware,
  3. Middleware<T> afterMiddleware
)

Runs middleware before and after the main

Implementation

void enforce(
  Middleware<T> beforeMiddleware,
  Middleware<T> middleware,
  Middleware<T> afterMiddleware,
) {
  use(getEnforceMiddleware(beforeMiddleware, middleware, afterMiddleware));
}