Exemplo n.º 1
0
        //________________________________________________________________________

        private BBCodeParser()
        {
            var rows = ReadDatabase();

            var compiler1 = new CSharpBBCodeCompiler();

            compiler1.DataSource = rows;
            //compiler1.SetDataSource(rows, r => r.TagName, r => r.RazorTemplate, r => r.ValidationCode);
            this.m_HtmlTagModules = compiler1.Compile();

            var compiler2 = new LiteralTextBBCodeCompiler();

            compiler2.DataSource = rows;
            //compiler2.SetDataSource(rows, r => r.TagName, r => r.RazorTemplate, r => r.ValidationCode);
            this.m_TextTagModules = compiler2.Compile();
        }
Exemplo n.º 2
0
        //________________________________________________________________________

        public BBCodeParser(
            IServiceProvider services,
            IHostingEnvironment environment)
        {
            this.m_Services = services;
            var rows = ReadDatabase(environment);

            var compiler1 = new CSharpBBCodeCompiler();

            compiler1.DataSource = rows;
            //compiler1.SetDataSource(rows, r => r.TagName, r => r.RazorTemplate, r => r.ValidationCode);
            this.m_HtmlTagModules = compiler1.Compile();

            var compiler2 = new LiteralTextBBCodeCompiler();

            compiler2.DataSource = rows;
            //compiler2.SetDataSource(rows, r => r.TagName, r => r.RazorTemplate, r => r.ValidationCode);
            this.m_TextTagModules = compiler2.Compile();
        }