示例#1
0
        /// <summary>
        /// Configure the Markdown processing.
        /// </summary>
        public static IServiceCollection AddMarkdown(this IServiceCollection services, Action <MarkdownConfiguration> configAction = null)
        {
            var config = new MarkdownConfiguration();

            configAction?.Invoke(config);

            services.AddSingleton(config);

            return(services);
        }
 public MarkdownProcessingMiddleware(RequestDelegate next, MarkdownConfiguration configuration, IWebHostEnvironment hostingEnvironment)
 {
     _next               = next;
     _configuration      = configuration;
     _hostingEnvironment = hostingEnvironment;
 }