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)); }
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)); }