internal static MarketplaceAppCapabilityNode ParseXml(XmlReader reader) { var node = new MarketplaceAppCapabilityNode(); 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; }
internal static MarketplaceAppCapabilityNode ParseXml(XmlReader reader) { var node = new MarketplaceAppCapabilityNode(); 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); }
internal static MarketplaceAppCapabilitiesNode ParseXml(XmlReader reader) { var node = new MarketplaceAppCapabilitiesNode(); var capabilities = new List <MarketplaceAppCapabilityNode>(); var hardwareCapabilities = new List <MarketplaceAppHwCapabilityNode>(); if (reader.IsEmptyElement) { reader.Skip(); } else { while (reader.NodeType != XmlNodeType.EndElement) { switch (reader.Name) { case "capability": capabilities.Add(MarketplaceAppCapabilityNode.ParseXml(reader)); break; case "hwCapability": hardwareCapabilities.Add(MarketplaceAppHwCapabilityNode.ParseXml(reader)); break; default: reader.Skip(); break; } } } node.Capabilities = capabilities.ToArray(); node.HardwareCapabilities = hardwareCapabilities.ToArray(); return(node); }