/// <summary>
 /// Adds all FlexiBlocks extensions to the specified <see cref="MarkdownPipelineBuilder"/>.
 /// </summary>
 /// <param name="pipelineBuilder">The <see cref="MarkdownPipelineBuilder"/> to add the extensions to.</param>
 /// <param name="flexiIncludeBlocksExtensionOptions">Options for the <see cref="FlexiIncludeBlocksExtensionOptions"/>.</param>
 /// <param name="flexiAlertBlocksExtensionOptions">Options for the <see cref="FlexiAlertBlocksExtension"/>.</param>
 /// <param name="flexiBannerBlocksExtensionOptions">Options for the <see cref="FlexiBannerBlocksExtension"/>.</param>
 /// <param name="flexiCardsBlocksExtensionOptions">Options for the <see cref="FlexiCardsBlocksExtension"/>.</param>
 /// <param name="flexiCodeBlocksExtensionOptions">Options for the <see cref="FlexiCodeBlocksExtension"/>.</param>
 /// <param name="flexiFigureBlocksExtensionOptions">Options for the <see cref="FlexiFigureBlocksExtension"/>.</param>
 /// <param name="flexiPictureBlocksExtensionOptions">Options for the <see cref="FlexiPictureBlocksExtension"/>.</param>
 /// <param name="flexiQuoteBlocksExtensionOptions">Options for the <see cref="FlexiQuoteBlocksExtension"/>.</param>
 /// <param name="flexiSectionBlocksExtensionOptions">Options for the <see cref="FlexiSectionBlocksExtension"/>.</param>
 /// <param name="flexiTableBlocksExtensionOptions">Options for the <see cref="FlexiTableBlocksExtension"/>.</param>
 /// <param name="flexiTabsBlocksExtensionOptions">Options for the <see cref="FlexiTabsBlocksExtension"/>.</param>
 /// <param name="flexiVideoBlocksExtensionOptions">Options for the <see cref="FlexiVideoBlocksExtension"/>.</param>
 public static MarkdownPipelineBuilder UseFlexiBlocks(this MarkdownPipelineBuilder pipelineBuilder,
                                                      IFlexiIncludeBlocksExtensionOptions flexiIncludeBlocksExtensionOptions = null,
                                                      IFlexiAlertBlocksExtensionOptions flexiAlertBlocksExtensionOptions     = null,
                                                      IFlexiBannerBlocksExtensionOptions flexiBannerBlocksExtensionOptions   = null,
                                                      IFlexiCardsBlocksExtensionOptions flexiCardsBlocksExtensionOptions     = null,
                                                      IFlexiCodeBlocksExtensionOptions flexiCodeBlocksExtensionOptions       = null,
                                                      IFlexiFigureBlocksExtensionOptions flexiFigureBlocksExtensionOptions   = null,
                                                      IFlexiPictureBlocksExtensionOptions flexiPictureBlocksExtensionOptions = null,
                                                      IFlexiQuoteBlocksExtensionOptions flexiQuoteBlocksExtensionOptions     = null,
                                                      IFlexiSectionBlocksExtensionOptions flexiSectionBlocksExtensionOptions = null,
                                                      IFlexiTableBlocksExtensionOptions flexiTableBlocksExtensionOptions     = null,
                                                      IFlexiTabsBlocksExtensionOptions flexiTabsBlocksExtensionOptions       = null,
                                                      IFlexiVideoBlocksExtensionOptions flexiVideoBlocksExtensionOptions     = null)
 {
     return(pipelineBuilder.
            UseContextObjects().
            UseFlexiIncludeBlocks(flexiIncludeBlocksExtensionOptions).
            UseFlexiOptionsBlocks().
            UseFlexiAlertBlocks(flexiAlertBlocksExtensionOptions).
            UseFlexiBannerBlocks(flexiBannerBlocksExtensionOptions).
            UseFlexiCardsBlocks(flexiCardsBlocksExtensionOptions).
            UseFlexiCodeBlocks(flexiCodeBlocksExtensionOptions).
            UseFlexiFigureBlocks(flexiFigureBlocksExtensionOptions).
            UseFlexiPictureBlocks(flexiPictureBlocksExtensionOptions).
            UseFlexiQuoteBlocks(flexiQuoteBlocksExtensionOptions).
            UseFlexiSectionBlocks(flexiSectionBlocksExtensionOptions).
            UseFlexiTableBlocks(flexiTableBlocksExtensionOptions).
            UseFlexiTabsBlocks(flexiTabsBlocksExtensionOptions).
            UseFlexiVideoBlocks(flexiVideoBlocksExtensionOptions));
 }
        /// <summary>
        /// Adds the <see cref="FlexiIncludeBlocksExtension"/> to the pipeline.
        /// </summary>
        /// <param name="pipelineBuilder">The pipeline builder for the pipeline.</param>
        /// <param name="options">Options for the <see cref="FlexiIncludeBlocksExtension"/>.</param>
        public static MarkdownPipelineBuilder UseFlexiIncludeBlocks(this MarkdownPipelineBuilder pipelineBuilder, IFlexiIncludeBlocksExtensionOptions options = null)
        {
            if (!pipelineBuilder.Extensions.Contains <IBlockExtension <FlexiIncludeBlock> >())
            {
                pipelineBuilder.Extensions.Add(GetOrCreateServiceProvider().GetRequiredService <IBlockExtension <FlexiIncludeBlock> >());
            }

            if (options != null)
            {
                AddContextObjectWithTypeAsKey(pipelineBuilder, options);
            }

            return(pipelineBuilder);
        }