private void InitializeView(ControllerBase controller, ViewBase parentView, ViewBase view, TextWriter output, RenderContext renderContext) { if (controller != null) { view.ViewBag = controller.ViewBag; } else { view.ViewBag = parentView.ViewBag; } view.InitializeView(output, this, renderContext); }
void IEngineViewSupport.RenderSection(string sectionName, TextWriter output, ViewBase view, RenderContext renderContext) { if(sectionName == null) { renderContext.BodyContent.Seek(0, SeekOrigin.Begin); var reader = new StreamReader(renderContext.BodyContent); CopyStream(reader, output); } }
public void InitializeView(TextWriter output,IEngineViewSupport engine, RenderContext renderContext) { _output = output; _engine = engine; _renderContext = renderContext; }