public VirtualTemplate GetVersion(ContentReference contentReference) { var template = _contentRepo.Get <VirtualTemplateContent>(contentReference); if (template != null) { return(new VirtualTemplate(_keyConverter.GetTemplateKey(template.VirtualPath), template.TemplateContents) { ChangedBy = template.ChangedBy, ChangedDate = template.Saved, StatusText = _localization.GetString("/versionstatus/" + template.Status, template.Status.ToString()) }); } return(null); }
public bool Exists(string virtualPath) { //Optimise for performance by using a Dictionary return(RegisteredViews.ContainsKey(_keyConverter.GetTemplateKey(virtualPath))); }