Exemplo n.º 1
0
        protected DocumentEntitySection GetConfigSection()
        {
            // Load From Web.Config
            DocumentEntitySection section = (DocumentEntitySection)ConfigurationManager.GetSection("documentEntity");

            return(section);
        }
Exemplo n.º 2
0
        protected virtual IDocumentTemplateProcessor FindTemplateProcessor(string extension)
        {
            if (string.IsNullOrEmpty(extension))
            {
                return(null);
            }

            DocumentEntitySection section = GetConfigSection();

            if (section == null)
            {
                return(null);
            }

            string typeName = section.TemplateProcessors.FindTypeName(extension);

            if (string.IsNullOrEmpty(typeName))
            {
                return(null);
            }

            return(AssemblyUtil.LoadObject <IDocumentTemplateProcessor>(typeName));
        }