Esempio n. 1
0
        public static NephosUriComponents GetNephosHostStyleUriComponents(Uri uri, string accountName)
        {
            string str;
            string str1;
            NephosUriComponents nephosUriComponent = new NephosUriComponents(accountName);

            string[]            uriPathSubStrings   = HttpRequestAccessorJuly09.GetUriPathSubStrings(uri, 2);
            NephosUriComponents nephosUriComponent1 = nephosUriComponent;

            if ((int)uriPathSubStrings.Length <= 0 || string.IsNullOrEmpty(uriPathSubStrings[0]))
            {
                str = null;
            }
            else
            {
                str = uriPathSubStrings[0];
            }
            nephosUriComponent1.ContainerName = str;
            NephosUriComponents nephosUriComponent2 = nephosUriComponent;

            if ((int)uriPathSubStrings.Length <= 1 || string.IsNullOrEmpty(uriPathSubStrings[1]))
            {
                str1 = null;
            }
            else
            {
                str1 = uriPathSubStrings[1];
            }
            nephosUriComponent2.RemainingPart = str1;
            nephosUriComponent.IsRemainingPartPresentButEmpty = ((int)uriPathSubStrings.Length <= 1 || uriPathSubStrings[1] == null ? false : uriPathSubStrings[1].Length == 0);
            return(nephosUriComponent);
        }
Esempio n. 2
0
        public static void GetContainerNameAndRemainingPart(Uri uri, bool uriIsPathStyle, out string containerName, out string remainingPart)
        {
            containerName = null;
            remainingPart = null;
            int num = (uriIsPathStyle ? 1 : 0);

            string[] uriPathSubStrings = HttpRequestAccessorJuly09.GetUriPathSubStrings(uri, num + 2);
            if (uriPathSubStrings != null && (int)uriPathSubStrings.Length > num)
            {
                containerName = uriPathSubStrings[num];
                if ((int)uriPathSubStrings.Length > num + 1)
                {
                    remainingPart = uriPathSubStrings[num + 1];
                }
            }
        }
Esempio n. 3
0
        public static NephosUriComponents GetNephosPathStyleUriComponents(Uri uri)
        {
            string str;
            string str1;
            string str2;
            NephosUriComponents nephosUriComponent = new NephosUriComponents()
            {
                IsUriPathStyle = true
            };

            string[]            uriPathSubStrings   = HttpRequestAccessorJuly09.GetUriPathSubStrings(uri, 3);
            NephosUriComponents nephosUriComponent1 = nephosUriComponent;

            if ((int)uriPathSubStrings.Length > 0)
            {
                str = HttpRequestAccessorCommon.TrimEndSlash(uriPathSubStrings[0]);
            }
            else
            {
                str = null;
            }
            nephosUriComponent1.AccountName = str;
            NephosUriComponents nephosUriComponent2 = nephosUriComponent;

            if ((int)uriPathSubStrings.Length <= 1 || string.IsNullOrEmpty(uriPathSubStrings[1]))
            {
                str1 = null;
            }
            else
            {
                str1 = uriPathSubStrings[1];
            }
            nephosUriComponent2.ContainerName = str1;
            NephosUriComponents nephosUriComponent3 = nephosUriComponent;

            if ((int)uriPathSubStrings.Length <= 2 || string.IsNullOrEmpty(uriPathSubStrings[2]))
            {
                str2 = null;
            }
            else
            {
                str2 = uriPathSubStrings[2];
            }
            nephosUriComponent3.RemainingPart = str2;
            nephosUriComponent.IsRemainingPartPresentButEmpty = ((int)uriPathSubStrings.Length <= 2 || uriPathSubStrings[2] == null ? false : uriPathSubStrings[2].Length == 0);
            return(nephosUriComponent);
        }
Esempio n. 4
0
 private static string[] GetUriPathSubStrings(Uri uri, int count)
 {
     return(HttpRequestAccessorJuly09.GetUriPathSubStrings(uri, count, StringSplitOptions.None));
 }
Esempio n. 5
0
 private static string[] GetAccountUriPathSubStrings(Uri uri, int count)
 {
     return(HttpRequestAccessorJuly09.GetUriPathSubStrings(uri, count, StringSplitOptions.RemoveEmptyEntries));
 }