Ejemplo n.º 1
0
        public virtual Task ProcessAsync(string filePath)
        {
            var razorGenerator        = new CSharpScriptRazorGenerator(Path.GetDirectoryName(filePath));
            var csharpScript          = razorGenerator.Generate(filePath);
            var razorContentGenerator = new RazorContentGenerator(Output, References);

            return(razorContentGenerator.Generate(csharpScript));
        }
Ejemplo n.º 2
0
        public virtual Task ProcessAsync(string filePath)
        {
            var razorGenerator = new CSharpScriptRazorGenerator(Path.GetDirectoryName(filePath));
            var csharpScript   = razorGenerator.Generate(filePath);

            var viewBag = new DynamicViewBag(ViewBag);

            ConfigureViewBag?.Invoke(viewBag);

            var razorContentGenerator = new RazorContentGenerator(Output, References, viewBag);

            return(razorContentGenerator.Generate(csharpScript));
        }