private static Uri ConstructHostStyleNephosUri(Uri hostSuffix, NephosUriComponents uriComponents) { if (uriComponents.AccountName == null) { return(hostSuffix); } string accountName = uriComponents.AccountName; if (uriComponents.IsSecondaryAccountAccess) { accountName = uriComponents.GetSecondaryAccountName(); } Uri uri = HttpRequestAccessorJuly09.ConstructHostStyleAccountUri(hostSuffix, accountName); StringBuilder stringBuilder = new StringBuilder(string.Empty); if (uriComponents.ContainerName != null) { stringBuilder.Append(uriComponents.ContainerName); } if (uriComponents.RemainingPart != null) { if (uriComponents.ContainerName != null) { stringBuilder.Append("/"); } stringBuilder.Append(uriComponents.RemainingPart); } return(HttpRequestAccessorJuly09.ConstructUriFromUriAndString(uri, stringBuilder.ToString())); }
private static Uri ConstructStorageDomainStyleNephosUri(Uri storageDomain, NephosUriComponents uriComponents) { StringBuilder stringBuilder = new StringBuilder(string.Empty); if (uriComponents.ContainerName != null) { stringBuilder.Append(uriComponents.ContainerName); } if (uriComponents.RemainingPart != null) { if (uriComponents.ContainerName != null) { stringBuilder.Append("/"); } stringBuilder.Append(uriComponents.RemainingPart); } return(HttpRequestAccessorJuly09.ConstructUriFromUriAndString(storageDomain, stringBuilder.ToString())); }
private static Uri ConstructPathStyleNephosUri(Uri endpoint, NephosUriComponents uriComponents) { StringBuilder stringBuilder = new StringBuilder(string.Empty); if (uriComponents.AccountName != null) { stringBuilder.Append(uriComponents.AccountName); if (uriComponents.IsSecondaryAccountAccess) { stringBuilder.Append("-secondary"); } if (uriComponents.ContainerName != null) { stringBuilder.Append("/"); stringBuilder.Append(uriComponents.ContainerName); } if (uriComponents.RemainingPart != null) { stringBuilder.Append("/"); stringBuilder.Append(uriComponents.RemainingPart); } } return(HttpRequestAccessorJuly09.ConstructUriFromUriAndString(endpoint, stringBuilder.ToString())); }