Exemplo n.º 1
0
        internal static ApplicationManifestLanguageNode ParseXml(XmlReader reader)
        {
            var node = new ApplicationManifestLanguageNode()
            {
                Code = reader.GetAttribute("code")
            };

            reader.Skip();

            return(node);
        }
        internal static ApplicationManifestLanguageNode ParseXml(XmlReader reader)
        {
            var node = new ApplicationManifestLanguageNode()
            {
                Code = reader.GetAttribute("code")
            };

            reader.Skip();

            return node;
        }
        internal static ApplicationManifest ParseXml(XmlReader reader)
        {
            reader.MoveToContent();

            var node = new ApplicationManifest
            {
                AppPlatformVersion = reader.GetAttribute("AppPlatformVersion")
            };

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                case "DefaultLanguage":
                    node.DefaultLanguage = ApplicationManifestLanguageNode.ParseXml(reader);

                    break;

                case "AppExtra":
                    node.AppExtras = reader.ReadElementContentAsArray(ApplicationManifestNamedNode.ParseXml);

                    break;

                case "Languages":
                    node.Languages = reader.ReadElementContentAsArray(ApplicationManifestLanguageNode.ParseXml);

                    break;

                case "App":
                    node.App = ApplicationManifestAppNode.ParseXml(reader);

                    break;

                default:
                    reader.Skip();

                    break;
                }
            }

            reader.ReadEndElement();

            return(node);
        }