示例#1
0
        public static FactoryNode Read(string filename)
        {
            FactoryReader reader = new FactoryReader();
            XDocument     doc    = XDocument.Load(filename);
            //
            XElement    element = doc.Element("root");
            FactoryNode root    = reader.ReadFactory(null, element);

            return(root);
        }
示例#2
0
        public static Factory Build(string name)
        {
            string filename = "../../../Content/production/" + name + ".xml";

            if (!File.Exists(filename))
            {
                return(null);
            }
            FactoryNode root = FactoryReader.Read(filename);

            return(BuildFactory(null, root));
        }