private DebugEventContractV1 ProcessDebug(ActionContext actionContext) { // Is the event data being requested TestDumpHeader testHeader = Context.Properties.Get <TestDumpHeader>(); if (testHeader?.Value != TestDumpHeader.Commands.Request) { return(null); } IEventDataBuffer eventDataBuffer = Context.Properties.Get <IEventDataBuffer>(); if (eventDataBuffer == null) { return(null); } IList <EventDetailContractV1> eventData = eventDataBuffer.SearchForBaseCv(Context.Cv.Value) .Select(x => x.ConvertTo()) .ToList(); return(new DebugEventContractV1 { EventData = eventData }); }
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; }