예제 #1
0
        public MysqlDB[] Call_MysqlFE_listdbs()
        {
            var xDocument = Call2("MysqlFE::listdbs");
            var t         = xDocument.GetResult(i => MysqlDB.FromXElement(i));

            return(t);
        }
예제 #2
0
        public static MysqlDB FromXElement(XElement x)
        {
            MysqlDB mysqlDB = new MysqlDB()
            {
                Name = x.Element("db").Value,
                Size = int.Parse(x.Element("size").Value)
            };
            var users = x.Descendants("user").Select(q => new MysqlUser(q.Value));

            mysqlDB.users.AddRange(users);
            return(mysqlDB);
        }