Esempio n. 1
0
        public VersionManifest GetLatestVersionManifest(Uri location)
        {
            try
            {
                //return XmlSerializeHelper.DeserializeItem(typeof(VersionManifest),
                //   location.LocalPath) as VersionManifest;

                return(VersionManifestLoader.Load(location.LocalPath));
            }
            catch
            {; }

            return(null);
        }
Esempio n. 2
0
        public VersionManifest GetLatestVersionManifest(Uri location)
        {
            try
            {
                try
                {
                    //var loc = new Uri(PathHelper.ConcatUri(location, VersionManifest.VersionManifestFileName));
                    DownloadFile(location, null);

                    if (_TempStream == null)
                    {
                        return(null);
                    }

                    _TempStream.Position = 0;
                    StreamReader sr = new StreamReader(_TempStream);
                    //return XmlSerializeHelper.DeserializeItem(sr.ReadToEnd(), typeof(VersionManifest)) as VersionManifest;
                    return(VersionManifestLoader.Load(sr));
                }
                catch
                {; }
                finally
                {
                    if (_TempStream != null)
                    {
                        _TempStream.Dispose();
                    }
                }

                return(null);
            }
            catch
            {; }

            return(null);
        }