示例#1
0
        public static IServiceCollection AddApiMocker(this IServiceCollection services)
        {
            ApiMockerDispatcher myDispatcher = new ApiMockerDispatcher(FileScanner.ScanFromMockLibrary());

            services.AddSingleton <ApiMockerDispatcher>(myDispatcher);
            return(services);
        }
示例#2
0
 public ApiMockerMiddleware(RequestDelegate next, ApiMockerDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
     _next       = next;
 }