示例#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));
        }
示例#2
0
 public LayoutRenderer(IHost host, ParrotViewLocator parrotViewLocator) : base(host)
 {
     _host = host;
     _parrotViewLocator = parrotViewLocator;
 }
示例#3
0
 public void Initialize(ViewEngineStartupContext viewEngineStartupContext)
 {
     _viewEngineStartupContext = viewEngineStartupContext;
     _parrotViewLocator = new ParrotViewLocator(_viewEngineStartupContext.ViewLocator.GetAllCurrentlyDiscoveredViews());
 }