public string Render(string viewPath) { var template = _viewFileReader.Read(viewPath); var view = _razorEngine.RunCompile(template, viewPath); return(view); }
public ITemplateSource Resolve(ITemplateKey key) { var templateKey = key as NameOnlyTemplateKey; if (templateKey == null) { throw new NotSupportedException("You can only use NameOnlyTemplateKey with this manager"); } var template = _viewFileReader.Read(templateKey.Name); return(new LoadedTemplateSource(template, templateKey.Name)); }