public void Initialize(UrlMappingConfig config)
        {
            AssertUtils.ArgumentNotNull(config, "urlmappingConfig");

            this.config = config;

            RefreshUrlMappingData();
        }
        /// <summary>
        /// Accepts a configuration object from the <see cref="UrlMappingModule"/>
        /// and initializes the provider.
        /// </summary>
        /// <param name="config">
        /// the configuration settings typed as a <c>UrlMappingProviderConfiguration</c> object; 
        /// the actual object type may be a subclass of <c>UrlMappingProviderConfiguration</c>.
        /// </param>
        void IUrlMappingProvider.Initialize(UrlMappingConfig config)
        {
            if (config == null)
                throw new ProviderException("Invalid UrlMappingProvider config.");

            // remember configuration settings
            this.config = config;

            // initialize the url mappings
            RefreshUrlMappingData();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Accepts a configuration object from the <see cref="UrlMappingModule"/>
        /// and initializes the provider.
        /// </summary>
        /// <param name="config">
        /// the configuration settings typed as a <c>UrlMappingProviderConfiguration</c> object;
        /// the actual object type may be a subclass of <c>UrlMappingProviderConfiguration</c>.
        /// </param>
        void IUrlMappingProvider.Initialize(UrlMappingConfig config)
        {
            if (config == null)
            {
                throw new ProviderException("Invalid UrlMappingProvider config.");
            }

            // remember configuration settings
            this.config = config;

            // initialize the url mappings
            RefreshUrlMappingData();
        }
Ejemplo n.º 4
0
        private void Initalize()
        {
            UrlMappingConfig config = UrlMappingConfig.Instance;

            _provider = ServiceLocator.Instance.Resolve <IUrlMappingProvider>();

            _noMatchAction                 = config.NoMatchAction;
            _noMatchRedirectPage           = config.NoMatchRedirectUrl;
            _automaticallyUpdateFormAction = config.AutoUpdateFormAction;
            _qsBehavior      = config.IncomingQueryStringBehavior;
            _processingEvent = config.UrlProcessingEvent;

            if (_provider != null)
            {
                _provider.Initialize(config);
            }

            // save to config
            config.Provider = _provider;
        }