public static IServiceCollection AddApiMocker(this IServiceCollection services) { ApiMockerDispatcher myDispatcher = new ApiMockerDispatcher(FileScanner.ScanFromMockLibrary()); services.AddSingleton <ApiMockerDispatcher>(myDispatcher); return(services); }
public ApiMockerMiddleware(RequestDelegate next, ApiMockerDispatcher dispatcher) { _dispatcher = dispatcher; _next = next; }