public void RenderBody(TextWriter writer) { using (callingView.SetDisposeableOutputWriter(writer)) { RenderBody(); } }
private static string GetFrom(IViewBaseInternal view, OutputMethod output) { string actual; using (var writer = new StringWriter()) using (view.SetDisposeableOutputWriter(writer)) { output.Invoke(); actual = writer.GetStringBuilder().ToString(); } return(actual); }
private static string GetFrom(IViewBaseInternal view, OutputMethod output) { string actual; using (StringWriter writer = new StringWriter()) using (view.SetDisposeableOutputWriter(writer)) { output.Invoke(); actual = writer.GetStringBuilder().ToString(); } return actual; }