public static async Task <string> RenderViewToStringAsync <TModel>(this RazorViewToStringRenderer razorViewToStringRenderer, string viewName, TModel model, ControllerContext controllerContext)
 {
     return(await razorViewToStringRenderer.RenderViewToStringAsync(viewName, model, controllerContext.RouteData,
                                                                    controllerContext.ActionDescriptor, controllerContext.HttpContext, controllerContext.ModelState));
 }
 public static async Task <string> RenderViewToStringAsync(this RazorViewToStringRenderer razorViewToStringRenderer, string viewName, dynamic model, PageContext pageContext)
 {
     return(await razorViewToStringRenderer.RenderViewToStringAsync <dynamic>(viewName, model, pageContext.RouteData,
                                                                              pageContext.ActionDescriptor, pageContext.HttpContext, pageContext.ModelState));
 }