Example #1
0
        public ParrotView(IHost host, IRendererFactory rendererFactory, ParrotViewLocator parrotViewLocator, Func<TextReader> contents, IParrotWriter writer)
        {
            _host = host;
            _rendererFactory = rendererFactory;
            _parrotViewLocator = parrotViewLocator;
            _contents = contents;
            _writer = writer;

            _rendererFactory.RegisterFactory(new LayoutRenderer(_host, _parrotViewLocator));
        }
Example #2
0
 public LayoutRenderer(IHost host, ParrotViewLocator parrotViewLocator) : base(host)
 {
     _host = host;
     _parrotViewLocator = parrotViewLocator;
 }
 public void Initialize(ViewEngineStartupContext viewEngineStartupContext)
 {
     _viewEngineStartupContext = viewEngineStartupContext;
     _parrotViewLocator = new ParrotViewLocator(_viewEngineStartupContext.ViewLocator.GetAllCurrentlyDiscoveredViews());
 }