internal static WindowsStoreServiceAppCategoryNode ParseXml(XmlReader reader)
        {
            var node = new WindowsStoreServiceAppCategoryNode();

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                case "I":
                    node.Id = reader.ReadElementContentAsInt();
                    break;

                case "N":
                    node.Name = reader.ReadElementContentAsString();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }

            reader.ReadEndElement();

            return(node);
        }
        internal static WindowsStoreServiceAppCategoryNode ParseXml(XmlReader reader)
        {
            var node = new WindowsStoreServiceAppCategoryNode();

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                    case "I":
                        node.Id = reader.ReadElementContentAsInt();
                        break;

                    case "N":
                        node.Name = reader.ReadElementContentAsString();
                        break;

                    default:
                        reader.Skip();
                        break;
                }
            }

            reader.ReadEndElement();

            return node;
        }
Esempio n. 3
0
        internal static WindowsStoreServiceAppPackageNode ParseXml(XmlReader reader)
        {
            var node = new WindowsStoreServiceAppPackageNode();

            reader.ReadStartElement();

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                switch (reader.Name)
                {
                case "I":
                    node.Id = reader.ReadElementContentAsString();
                    break;

                case "R":
                    node.ReleaseId = reader.ReadElementContentAsString();
                    break;

                case "Pfn":
                    node.FamilyName = reader.ReadElementContentAsString();
                    break;

                case "L":
                    node.Language = reader.ReadElementContentAsString();
                    break;

                case "T":
                    node.Title = reader.ReadElementContentAsString();
                    break;

                case "Ico":
                    node.Icon = reader.ReadElementContentAsString();
                    break;

                case "Bg":
                    node.BackgroundColor = reader.ReadElementContentAsString();
                    break;

                case "Fg":
                    node.ForegroundColor = reader.ReadElementContentAsString();
                    break;

                case "Cs":
                    node.CurrencySymbol = reader.ReadElementContentAsString();
                    break;

                case "Cc":
                    node.Currency = reader.ReadElementContentAsString();
                    break;

                case "P":
                    node.Price = reader.ReadElementContentAsDouble();
                    break;

                case "C":
                    node.Category = WindowsStoreServiceAppCategoryNode.ParseXml(reader);
                    break;

                case "Sc":
                    node.SubCategory = WindowsStoreServiceAppCategoryNode.ParseXml(reader);
                    break;

                case "Lud":
                    node.LastUpdate = reader.ReadElementContentAsNullable <DateTime>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }

            reader.ReadEndElement();

            return(node);
        }