Represents a set of url mappings
Inheritance: System.Collections.CollectionBase, ISerializedConfig
コード例 #1
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;
		}
コード例 #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;
        }