Queue <string> IOnlineSourcesConfig.GetDataFileURLs(IOnlineUrlHolder urlHolder, IOnlineSourceHolder sourceHolder) { Queue <string> result = new Queue <string>(); result.Enqueue(string.Join('/', urlHolder.GetBaseUrl(), sourceHolder.GetPlatform(), sourceHolder.GetVersion(), urlHolder.GetBaseUrlSuffix(), dataContainer)); return(result); }
Queue <string> IOnlineSourcesConfig.GetDataFileURLs(IOnlineUrlHolder urlHolder, IOnlineSourceHolder sourceHolder) { Queue <string> result = new Queue <string>(); Console.WriteLine("gathering online source addresses..."); XDocument document = XMLUtils.LoadDocumentFromURL(GetAssetInfoUrl(urlHolder, sourceHolder)); foreach ( string actualFileName in from fileName in XMLUtils.FindNodeValuesAtPath(document.Root, assetFileNamePath.Split(':')) where CustomRegex.AllMatching(fileName, dataContainerRegexFilters) let addressKey = addressDictSupplier.GetOnlineAddressDict().First(kvp => fileName.StartsWith(kvp.Key)) select addressKey.Value + fileName.Substring(addressKey.Key.Length)) { result.Enqueue(GetOnlineBaseUrl(urlHolder, sourceHolder) + "/" + actualFileName); } return(result); }
private string GetAssetInfoUrl(IOnlineUrlHolder urlHolder, IOnlineSourceHolder sourceHolder) { return(string.Join('/', GetOnlineBaseUrl(urlHolder, sourceHolder), assetInfo)); }
private string GetOnlineBaseUrl(IOnlineUrlHolder urlHolder, IOnlineSourceHolder sourceHolder) { return(string.Join('/', urlHolder.GetBaseUrl(), sourceHolder.GetPlatform(), sourceHolder.GetVersion(), urlHolder.GetBaseUrlSuffix())); }