public TrotterWatchMiddleware(RequestDelegate next, TrotterWatchOptions options)
        {
            _next           = next;
            _continueChecks = options.ContinueChecks;
            _rblProviders   = options.RblProviders is null?ProviderFactory.ReturnRblItems() : ProviderFactory.ReturnRblItems(options.RblProviders);

            _logger = new TrotterLog(options.Logger);
        }
Exemplo n.º 2
0
        public static IApplicationBuilder UseTrotterWatch(this IApplicationBuilder app, TrotterWatchOptions options)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }

            return(app.UseMiddleware <TrotterWatch.Core.TrotterWatchMiddleware>(options));
        }