private IDictionary <string, PropertyInfo> InitializePlaceholderProperties() { WebPageBase webPage; PageTemplateDescriptor parsedTemplate; IDictionary <string, PropertyInfo> placeholderProperties; Exception loadingException; if (!_provider.LoadRazorTemplate(ControlVirtualPath, out webPage, out parsedTemplate, out placeholderProperties, out loadingException)) { throw loadingException; } Verify.IsNotNull(webPage, "Failed to compile razor page template '{0}'", ControlVirtualPath); Verify.That(webPage is RazorPageTemplate, "Incorrect base class. '{0}'", ControlVirtualPath); return(placeholderProperties); }
private void Initialize() { WebPageBase webPage; PageTemplateDescriptor parsedTemplate; IDictionary <string, PropertyInfo> placeholderProperties; Exception loadingException; if (!_provider.LoadRazorTemplate(VirtualPath, out webPage, out parsedTemplate, out placeholderProperties, out loadingException)) { LoadingException = loadingException; _initialized = true; throw loadingException; } Verify.IsNotNull(webPage, "Failed to compile razor page template '{0}'", VirtualPath); Verify.That(webPage is RazorPageTemplate, "Incorrect base class. '{0}'", VirtualPath); this.DefaultPlaceholderId = parsedTemplate.DefaultPlaceholderId; this.PlaceholderDescriptions = parsedTemplate.PlaceholderDescriptions; }