/// <summary>
        ///     Initialises a new instance of <see cref="TemplateServiceConfiguration" />.
        /// </summary>
        public TemplateServiceConfiguration()
        {
            Activator = new DefaultActivator();
            CompilerServiceFactory = new DefaultCompilerServiceFactory();
            EncodedStringFactory   = new HtmlEncodedStringFactory();
            CodeInspectors         = new List <ICodeInspector>();

            Namespaces = new HashSet <string>
            {
                "System",
                "System.Collections.Generic",
                "System.Linq"
            };

            var config = RazorEngineConfigurationSection.GetConfiguration();

            Language = (config == null)
                           ? Language.CSharp
                           : config.DefaultLanguage;
        }
 /// <summary>
 ///     Initialises the <see cref="TemplateServiceFactory" /> type.
 /// </summary>
 static TemplateServiceFactory()
 {
     Configuration = RazorEngineConfigurationSection.GetConfiguration();
 }