private string invokeWrapped(Type requestType) { var chain = _resolver.FindUniqueByType(requestType); var partial = _factory.BuildPartial(chain); return(_writer.Record(partial.InvokePartial).GetText()); }
public virtual IRecordedOutput CreateOuput(string resourceHash, Action <IActionBehavior> innerInvocation) { var newOutput = _writer.Record(() => innerInvocation(_inner)); newOutput.ForHeader(HttpResponseHeaders.ETag, etag => _etagCache.Register(resourceHash, etag)); return(newOutput); }
public virtual IRecordedOutput CreateOutput(string resourceHash, Action invocation) { var newOutput = _writer.Record(invocation); _headersCache.Register(resourceHash, newOutput.Headers()); return(newOutput); }
private void handleInvokation(Action invokation) { var model = _request.Get <TInputModel>(); _cache.WithCache(model, requestModel => _writer.Record(invokation), cachedData => _writer.Write(cachedData.RecordedContentType, cachedData.Content)); }
private string invokeWrapped(Type requestType, string categoryOrHttpMethod = null) { var chain = _resolver.FindUniqueByType(requestType, category: categoryOrHttpMethod ?? Categories.VIEW); var partial = _factory.BuildPartial(chain); var output = _writer.Record(partial.InvokePartial); output.Headers().Each(x => _writer.AppendHeader(x.Name, x.Value)); return(output.GetText()); }
public RecordedOutput Record(Action action) { var recordedOuput = _inner.Record(action); _report.AddDetails(new OutputReport() { Contents = recordedOuput.Content, ContentType = recordedOuput.RecordedContentType }); return(recordedOuput); }
public void Invoke() { var output = _writer.Record(() => _inner.Invoke()); var subject = new T { InnerContent = output.GetText() }; _customization(subject); var html = _partials.InvokeObject(subject); _writer.WriteHtml(html); }
public string GetText(Type requestType) { var partial = buildPartial(requestType); return(_writer.Record(partial.InvokePartial).GetText()); }
private string invokeWrapped(Type requestType) { var partial = _factory.BuildPartial(requestType); return(_writer.Record(partial.InvokePartial).GetText()); }