/// <summary>
        /// Sets use default http scheme handler flag.
        /// </summary>
        /// <param name="schemeName">
        /// The scheme name.
        /// </param>
        /// <param name="domainName">
        /// The domain name.
        /// </param>
        /// <returns>
        /// The <see cref="ChromelyConfiguration"/> object.
        /// </returns>
        public ChromelyConfiguration UseDefaultHttpSchemeHandler(string schemeName, string domainName)
        {
            var handler = new ChromelySchemeHandler(schemeName, domainName, false, true);

            this.RegisterSchemeHandler(handler);

            return(this);
        }
Пример #2
0
        public virtual ChromelyConfiguration RegisterSchemeHandler(ChromelySchemeHandler chromelySchemeHandler)
        {
            if (chromelySchemeHandler != null)
            {
                UrlScheme scheme = new UrlScheme(chromelySchemeHandler.SchemeName, chromelySchemeHandler.DomainName, false);
                UrlSchemeProvider.RegisterScheme(scheme);
                IoC.RegisterInstance(typeof(ChromelySchemeHandler), chromelySchemeHandler.Key, chromelySchemeHandler);
            }

            return(this);
        }
Пример #3
0
        /// <summary>
        /// Registers scheme handler.
        /// </summary>
        /// <param name="schemeHandler">
        /// The chromely scheme handler.
        /// </param>
        /// <returns>
        /// The <see cref="ChromelyConfiguration"/> object.
        /// </returns>
        public virtual ChromelyConfiguration RegisterSchemeHandler(ChromelySchemeHandler schemeHandler)
        {
            if (schemeHandler != null)
            {
                var scheme = new UrlScheme(schemeHandler.SchemeName, schemeHandler.DomainName, UrlSchemeType.Custom);
                UrlSchemeProvider.RegisterScheme(scheme);
                IoC.RegisterInstance(typeof(ChromelySchemeHandler), schemeHandler.Key, schemeHandler);
            }

            return(this);
        }