private void WriteExtensionDataMember(XmlWriterDelegator xmlWriter, ExtensionDataMember member) { xmlWriter.WriteStartElement(member.Name, member.Namespace); IDataNode dataNode = member.Value; WriteExtensionDataValue(xmlWriter, dataNode); xmlWriter.WriteEndElement(); }
private ExtensionDataMember ReadExtensionDataMember(XmlReaderDelegator xmlReader, int memberIndex) { var member = new ExtensionDataMember(xmlReader.LocalName, xmlReader.NamespaceURI) { MemberIndex = memberIndex }; member.Value = xmlReader.UnderlyingExtensionDataReader != null?xmlReader.UnderlyingExtensionDataReader.GetCurrentNode() : ReadExtensionDataValue(xmlReader); return(member); }
public void WriteExtensionData(XmlWriterDelegator xmlWriter, ExtensionDataObject extensionData, int memberIndex) { if ((!base.IgnoreExtensionDataObject && (extensionData != null)) && (extensionData.Members != null)) { for (int i = 0; i < extensionData.Members.Count; i++) { ExtensionDataMember member = extensionData.Members[i]; if (member.MemberIndex == memberIndex) { this.WriteExtensionDataMember(xmlWriter, member); } } } }
private ExtensionDataMember ReadExtensionDataMember(XmlReaderDelegator xmlReader, int memberIndex) { ExtensionDataMember member = new ExtensionDataMember { Name = xmlReader.LocalName, Namespace = xmlReader.NamespaceURI, MemberIndex = memberIndex }; if (xmlReader.UnderlyingExtensionDataReader != null) { member.Value = xmlReader.UnderlyingExtensionDataReader.GetCurrentNode(); return(member); } member.Value = this.ReadExtensionDataValue(xmlReader); return(member); }
private void MoveNextInClass(ClassDataNode dataNode) { if ((dataNode.Members != null) && (this.element.childElementIndex < dataNode.Members.Count)) { if (this.element.childElementIndex == 0) { this.context.IncrementItemCount(-dataNode.Members.Count); } ExtensionDataMember member = dataNode.Members[this.element.childElementIndex++]; this.SetNextElement(member.Value, member.Name, member.Namespace, GetPrefix(member.Namespace)); } else { this.internalNodeType = ExtensionDataNodeType.EndElement; this.element.childElementIndex = 0; } }
public void WriteExtensionData(XmlWriterDelegator xmlWriter, ExtensionDataObject extensionData, int memberIndex) { if (IgnoreExtensionDataObject || extensionData == null) { return; } IList <ExtensionDataMember> members = extensionData.Members; if (members != null) { for (int i = 0; i < extensionData.Members.Count; i++) { ExtensionDataMember member = extensionData.Members[i]; if (member.MemberIndex == memberIndex) { WriteExtensionDataMember(xmlWriter, member); } } } }