Exemplo n.º 1
0
        private static string DetermineUriScheme(HttpContextBase context, SecureConnectionOption option)
        {
            switch (option)
            {
            case SecureConnectionOption.Always:
            case SecureConnectionOption.Preferred:
                return(Uri.UriSchemeHttps);

            case SecureConnectionOption.Never:
                return(Uri.UriSchemeHttp);
            }
            return(context.Request.Url.Scheme);
        }
Exemplo n.º 2
0
		private static string DetermineUriScheme(HttpContextBase context, SecureConnectionOption option)
		{
			switch (option)
			{
				case SecureConnectionOption.Always:
				case SecureConnectionOption.Preferred:
					return Uri.UriSchemeHttps;
				case SecureConnectionOption.Never:
					return Uri.UriSchemeHttp;
			}
			return context.Request.Url.Scheme;
		}