Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of HtmlRenderer.
 /// </summary>
 public HtmlRenderer()
 {
     _contentRendererCollection = new ContentRendererCollection();
     _contentRendererCollection.AddRenderers(new List <IContentRenderer> {
         new ParagraphRenderer(_contentRendererCollection),
         new HyperlinkContentRenderer(_contentRendererCollection),
         new TextRenderer(),
         new HorizontalRulerContentRenderer(),
         new HeadingRenderer(_contentRendererCollection),
         new ListContentRenderer(_contentRendererCollection),
         new ListItemContentRenderer(_contentRendererCollection),
         new QuoteContentRenderer(_contentRendererCollection),
         new AssetRenderer(_contentRendererCollection),
         new NullContentRenderer()
     });
 }
Exemplo n.º 2
0
 public HtmlRenderer(HtmlRendererOptions options)
 {
     options ??= new HtmlRendererOptions();
     _contentRendererCollection = new ContentRendererCollection();
     _contentRendererCollection.AddRenderers(new List <IContentRenderer> {
         new ParagraphRenderer(_contentRendererCollection),
         new HyperlinkContentRenderer(_contentRendererCollection),
         new TextRenderer(true),
         new HorizontalRulerContentRenderer(),
         new HeadingRenderer(_contentRendererCollection),
         new TableRenderer(_contentRendererCollection),
         new TableRowRenderer(_contentRendererCollection),
         new TableCellRenderer(_contentRendererCollection),
         new TableHeaderRenderer(_contentRendererCollection),
         new ListContentRenderer(_contentRendererCollection),
         new ListItemContentRenderer(_contentRendererCollection, options.ListItemOptions),
         new QuoteContentRenderer(_contentRendererCollection),
         new AssetRenderer(_contentRendererCollection),
         new NullContentRenderer()
     });
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new QuoteContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public QuoteContentRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new ListItemContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public ListItemContentRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new HyperlinkContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public HyperlinkContentRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new AssetRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public AssetRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new HeadingRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public HeadingRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new PragraphRenderer
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public ParagraphRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new ListItemContentRenderer.
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 /// <param name="options">Options for rendering list items</param>
 public ListItemContentRenderer(ContentRendererCollection rendererCollection, ListItemContentRendererOptions options)
 {
     _rendererCollection = rendererCollection;
     _options            = options ?? new ListItemContentRendererOptions();
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new TableCellRenderer
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public TableCellRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new TableHeaderRenderer
 /// </summary>
 /// <param name="rendererCollection">The collection of renderer to use for sub-content.</param>
 public TableHeaderRenderer(ContentRendererCollection rendererCollection)
 {
     _rendererCollection = rendererCollection;
 }