コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 private string GetAssetInfoUrl(IOnlineUrlHolder urlHolder, IOnlineSourceHolder sourceHolder)
 {
     return(string.Join('/', GetOnlineBaseUrl(urlHolder, sourceHolder), assetInfo));
 }
コード例 #4
0
 private string GetOnlineBaseUrl(IOnlineUrlHolder urlHolder, IOnlineSourceHolder sourceHolder)
 {
     return(string.Join('/', urlHolder.GetBaseUrl(), sourceHolder.GetPlatform(), sourceHolder.GetVersion(), urlHolder.GetBaseUrlSuffix()));
 }