internal TextWriterDecorator(TextWriter decoratedWriter, PageExecutionListenerFeature listener, int renderdOutputIndex) { _decoratedWriter = decoratedWriter; _listener = listener; _bufferWriter = new StringWriter(_decoratedWriter.FormatProvider); _bufferWriter.NewLine = _decoratedWriter.NewLine; RenderedOutputIndex = renderdOutputIndex; }
private PageExecutionListenerFeature AddPageExecutionListenerFeatureTo(HttpContext context, string requestId) { RequestHeaders requestHeader = new RequestHeaders(context.Request.Headers); string hostUrl = BrowserLinkMiddleWareUtil.GetRequestUrl(requestHeader); IHttpSocketAdapter mappingDataSocket = GetSocketConnectionToHost(_applicationPath, requestId, "sendMappingData", context.Request.IsHttps, hostUrl); if (mappingDataSocket != null) { PageExecutionListenerFeature listener = new PageExecutionListenerFeature(mappingDataSocket); context.Features.Set(listener); return(listener); } return(null); }