Represents a set of MonoRail extensions
Inheritance: System.Collections.CollectionBase, ISerializedConfig
		/// <summary>
		/// Initializes a new instance of the <see cref="MonoRailConfiguration"/> class.
		/// </summary>
		public MonoRailConfiguration()
		{
			smtpConfig = new SmtpConfig();
			viewEngineConfig = new ViewEngineConfig();
			controllersConfig = new ControllersConfig();
			viewComponentsConfig = new ViewComponentsConfig();
			scaffoldConfig = new ScaffoldConfig();
			urlConfig = new UrlConfig();
			routingRules = new RoutingRuleCollection();
			extensions = new ExtensionEntryCollection();
			defaultUrls = new DefaultUrlCollection();
			jsGeneratorConfig = new JSGeneratorConfiguration();

			jsGeneratorConfig.AddLibrary("prototype-1.5.1", typeof(PrototypeGenerator))
				.AddExtension(typeof(CommonJSExtension))
				.AddExtension(typeof(ScriptaculousExtension))
				.AddExtension(typeof(BehaviourExtension))
				.BrowserValidatorIs(typeof(PrototypeWebValidator))
				.SetAsDefault();

			// old routing support related
			matchHostNameAndPath = false;
			excludeAppPath = false;
		}
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MonoRailConfiguration"/> class.
        /// </summary>
        public MonoRailConfiguration()
        {
            smtpConfig           = new SmtpConfig();
            viewEngineConfig     = new ViewEngineConfig();
            controllersConfig    = new ControllersConfig();
            viewComponentsConfig = new ViewComponentsConfig();
            scaffoldConfig       = new ScaffoldConfig();
            urlConfig            = new UrlConfig();
            routingRules         = new RoutingRuleCollection();
            extensions           = new ExtensionEntryCollection();
            defaultUrls          = new DefaultUrlCollection();
            jsGeneratorConfig    = new JSGeneratorConfiguration();

            jsGeneratorConfig.AddLibrary("prototype-1.5.1", typeof(PrototypeGenerator))
            .AddExtension(typeof(CommonJSExtension))
            .AddExtension(typeof(ScriptaculousExtension))
            .AddExtension(typeof(BehaviourExtension))
            .BrowserValidatorIs(typeof(PrototypeWebValidator))
            .SetAsDefault();

            // old routing support related
            matchHostNameAndPath = false;
            excludeAppPath       = false;
        }