Exemple #1
0
        public List <AppVO> Load()
        {
            List <AppVO> items = new List <AppVO>();

            if (Directory.Exists(PATH))
            {
                var files = Directory.GetFiles(PATH);
                var doc   = new XmlDocument();
                var app   = new AppVO();

                foreach (var file in files)
                {
                    doc.Load(file);

                    foreach (XmlNode node in doc.ChildNodes)
                    {
                        if (node.Name.ToLower().Equals("id"))
                        {
                            app.ID = Convert.ToInt32(node.Value);
                        }
                        if (node.Name.ToLower().Equals("name"))
                        {
                            app.Name = node.Value;
                        }
                        if (node.Name.ToLower().Equals("version"))
                        {
                            app.Version = node.Value;
                        }
                    }
                }
            }

            return(items);
        }
Exemple #2
0
 public static AppVO Parse(XElement data)
 {
     var app = new AppVO();
     app.BundleID = data.Attribute("BundleID").Value;
     app.RechargeType = data.Attribute("RechargeType").Value;
     app.Version = data.Attribute("Version").Value;
     app.VersionValue = ServiceManager.GetVersionValue(app.Version);
     app.UpdateUrl = data.Attribute("UpdateUrl").Value;
     app.ForceUpdate = bool.Parse(data.Attribute("ForceUpdate").Value);
     app.IsTest = bool.Parse(data.Attribute("IsTest").Value);
     app.OpenTestAccount = bool.Parse(data.Attribute("OpenTestAccount").Value);
     return app;
 }
Exemple #3
0
        public List <AppVO> Load()
        {
            List <AppVO> items = new List <AppVO>();

            string path = string.Format("{0}\\{1}", Directory.GetParent(HttpRuntime.AppDomainAppPath).Parent.FullName, DIRECTORY_PATH);

            if (Directory.Exists(path))
            {
                var files = Directory.GetFiles(path);
                var doc   = new XmlDocument();

                foreach (var file in files)
                {
                    var app = new AppVO();

                    doc.Load(file);

                    foreach (XmlNode node in doc.ChildNodes[1])
                    {
                        if (node.Name.ToLower().Equals("id"))
                        {
                            app.ID = Convert.ToInt32(node.InnerText);
                        }
                        if (node.Name.ToLower().Equals("name"))
                        {
                            app.Name = node.InnerText;
                        }
                        if (node.Name.ToLower().Equals("version"))
                        {
                            app.Version = node.InnerText;
                        }
                    }

                    items.Add(app);
                }
            }

            return(items);
        }
Exemple #4
0
 public void Save(AppVO value)
 {
     throw new NotImplementedException();
 }