public void TestUrl() { const string url = "http://elastastorage.blob.core.windows.net/vm-images/imkzmoeb.yfo20130120221739.vhd"; var helper = new UrlHelper(url); Assert.AreEqual("elastastorage.blob.core.windows.net", helper.HostFullDomain); Assert.AreEqual("vm-images", helper.Path); Assert.AreEqual("imkzmoeb.yfo20130120221739.vhd", helper.File); Assert.AreEqual("elastastorage", helper.HostSubDomain); }
/// <summary> /// Returns the name of the blob and container /// </summary> /// <param name="blobAddress"></param> private string ParseBlobDetails(string blobAddress) { var helper = new UrlHelper(blobAddress); StorageContainerName = helper.Path; StorageFileName = helper.File; return helper.HostSubDomain; }