Esempio n. 1
0
        public static void LoadPackageInfo(string sourceFilename)
        {
            XmlPackagesAdapter  xpa   = new XmlPackagesAdapter();
            IList <PackageInfo> infos = xpa.Load(sourceFilename);

            if (infos != null)
            {
                foreach (PackageInfo info in infos)
                {
                    _packagesOffline.Add(info.domain, info);
                }
            }
        }
Esempio n. 2
0
        public static void LoadPackageInfo()
        {
            IList <PackageInfo> infos
                = System.Configuration.ConfigurationManager.GetSection("yttrium/packages") as IList <PackageInfo>;

            if (infos == null)
            {
                FileInfo fi = new FileInfo(@"yttrium.packages.config");
                if (fi.Exists)
                {
                    XmlPackagesAdapter xpa = new XmlPackagesAdapter();
                    infos = xpa.Load(fi.FullName);
                }
            }
            if (infos != null)
            {
                foreach (PackageInfo info in infos)
                {
                    _packagesOffline.Add(info.domain, info);
                }
            }
        }