Inheritance: IRendererFactory
Esempio n. 1
0
        private void InitializeRendererFactory()
        {
            var factory = new RendererFactory(this);

            factory.RegisterFactory("layout", new LayoutRenderer(this));
            factory.RegisterFactory("content", new ContentRenderer(this));

            DependencyResolver.Register(typeof(IRendererFactory), () => factory);
        }
Esempio n. 2
0
 public AspNetHost(IParrotWriterProvider parrotWriterProvider)
 {
     _parrotWriterProvider = parrotWriterProvider;
     ValueTypeProvider = new ValueTypeProvider();
     ModelValueProviderFactory = new ModelValueProviderFactory(ValueTypeProvider);
     AttributeRenderer = new AttributeRenderer();
     RendererFactory = new RendererFactory(new IRenderer[]
         {
             new HtmlRenderer(this),
             new StringLiteralRenderer(this),
             new DocTypeRenderer(this),
             new LayoutRenderer(this),
             new PartialRenderer(this),
             new ContentRenderer(this),
             new ForeachRenderer(this),
             new InputRenderer(this),
             new ConditionalRenderer(this),
             new ListRenderer(this),
             new SelfClosingRenderer(this),
             new ActionRenderer(this), 
             new DefineRenderer(this), 
         });
     PathResolver = new PathResolver();
 }