OpenFile() публичный Метод

public OpenFile ( string url ) : MemoryStream
url string
Результат System.IO.MemoryStream
Пример #1
0
        private void DownloadIndexFile(string archive, int i)
        {
            try
            {
                string file = CASCConfig.CDNPath + "/data/" + archive.Substring(0, 2) + "/" + archive.Substring(2, 2) + "/" + archive + ".index";
                string url  = "http://" + CASCConfig.CDNHost + "/" + file;

                Stream stream = Cache.OpenFile(file, url, false);

                if (stream != null)
                {
                    ParseIndex(stream, i);
                }
                else
                {
                    using (var fs = downloader.OpenFile(url))
                        ParseIndex(fs, i);
                }
            }
            catch
            {
                throw new Exception("DownloadFile failed!");
            }
        }