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

            if (reader.IsEmptyElement)
            {
                reader.Skip();
            }
            else
            {
                reader.ReadStartElement();

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

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

                        case "disclosure":
                            node.Disclosure = reader.ReadElementContentAsString();
                            break;

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

                reader.ReadEndElement();
            }

            return node;
        }
예제 #2
0
        internal static WindowsPhoneStoreServiceAppCapabilityNode ParseXml(XmlReader reader)
        {
            var node = new WindowsPhoneStoreServiceAppCapabilityNode();

            if (reader.IsEmptyElement)
            {
                reader.Skip();
            }
            else
            {
                reader.ReadStartElement();

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

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

                    case "disclosure":
                        node.Disclosure = reader.ReadElementContentAsString();
                        break;

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

                reader.ReadEndElement();
            }

            return(node);
        }
예제 #3
0
        internal static WindowsPhoneStoreServiceAppCapabilitiesNode ParseXml(XmlReader reader)
        {
            var node = new WindowsPhoneStoreServiceAppCapabilitiesNode();

            var capabilities         = new List <WindowsPhoneStoreServiceAppCapabilityNode>();
            var hardwareCapabilities = new List <WindowsPhoneStoreServiceAppHwCapabilityNode>();

            if (reader.IsEmptyElement)
            {
                reader.Skip();
            }
            else
            {
                while (reader.NodeType != XmlNodeType.EndElement)
                {
                    switch (reader.Name)
                    {
                    case "capability":
                        capabilities.Add(WindowsPhoneStoreServiceAppCapabilityNode.ParseXml(reader));
                        break;

                    case "hwCapability":
                        hardwareCapabilities.Add(WindowsPhoneStoreServiceAppHwCapabilityNode.ParseXml(reader));
                        break;

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

            node.Capabilities         = capabilities.ToArray();
            node.HardwareCapabilities = hardwareCapabilities.ToArray();

            return(node);
        }