コード例 #1
0
 public beer_xml()
 {
     Item = new beer_xmlRecipes();
 }
コード例 #2
0
ファイル: BeerXmlV1.cs プロジェクト: krysiu/brewtrolleralpha
        public static beer_xml Load(XDocument v1XmlDocument)
        {
            var beerXmlV2 = new beer_xml();

            List<RecipeType> recipeList = new List<RecipeType>();

            var nameList = GetRecipeNames(v1XmlDocument);
            foreach (string recipeName in nameList)
            {
                RecipeType xmlRecipe = new RecipeType();
                if (ImportV1BeerXml(beerXmlV2, v1XmlDocument, recipeName, xmlRecipe))
                    recipeList.Add(xmlRecipe);
            }

            var xmlRecipes = new beer_xmlRecipes();
            xmlRecipes.recipe = recipeList.ToArray();

            beerXmlV2.Item = xmlRecipes;

            return beerXmlV2;
        }