public ErrorHandlingMiddleware(RequestDelegate next, IServiceConfiguration middleWareContext) { Verify.IsNotNull(nameof(next), next); Verify.IsNotNull(nameof(middleWareContext), middleWareContext); _next = next; _serviceConfiguration = middleWareContext; _webEventLog = _serviceConfiguration.Get <IWebEventLog>() ?? AspMvcEventSource.Log; _eventDataBuffer = _serviceConfiguration.Get <IEventDataBuffer>(); _verboseOnErrors = _serviceConfiguration.Get <VerboseOnErrors>()?.ShowErrors ?? false; }
public SetupMiddleware(RequestDelegate next, IHeaderFactory headerFactory, IServiceConfiguration middleWareContext) { Verify.IsNotNull(nameof(next), next); Verify.IsNotNull(nameof(headerFactory), headerFactory); Verify.IsNotNull(nameof(middleWareContext), middleWareContext); _next = next; _headerFactory = headerFactory; _serviceConfiguration = middleWareContext; _webLogEvent = _serviceConfiguration.Get <IWebEventLog>() ?? AspMvcEventSource.Log; }