/// <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;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LibraryConfigurationBuilder"/> class.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 /// <param name="config">The config.</param>
 public LibraryConfigurationBuilder(JSGeneratorConfiguration configuration, LibraryConfiguration config)
 {
     this.configuration = configuration;
     this.config        = config;
     elementConfig      = new ElementGeneratorConfigBuilder(this);
 }
			/// <summary>
			/// Initializes a new instance of the <see cref="LibraryConfigurationBuilder"/> class.
			/// </summary>
			/// <param name="configuration">The configuration.</param>
			/// <param name="config">The config.</param>
			public LibraryConfigurationBuilder(JSGeneratorConfiguration configuration, LibraryConfiguration config)
			{
				this.configuration = configuration;
				this.config = config;
				elementConfig = new ElementGeneratorConfigBuilder(this);
			}