private void ReadContributorElement(IODataAtomReaderEntryState entryState, EpmTargetPathSegment epmTargetPathSegment) { if (this.ShouldReadCollectionElement(entryState.AtomEntryMetadata.Contributors.Any <AtomPersonMetadata>())) { AtomMetadataReaderUtils.AddContributorToEntryMetadata(entryState.AtomEntryMetadata, base.ReadAtomPersonConstruct(epmTargetPathSegment)); } else { base.XmlReader.Skip(); } }
/// <summary> /// Reads a contributor element. /// </summary> /// <param name="entryState">The reader entry state for the entry being read.</param> /// <param name="epmTargetPathSegment">The EPM target path segment for the element to read, or null if no EPM for that element is defined.</param> /// <remarks> /// Pre-Condition: XmlNodeType.Element (atom:contributor) - the atom:contributor element to read. /// Post-Condition: Any - the node after the atom:contributor element which was read. /// </remarks> private void ReadContributorElement(IODataAtomReaderEntryState entryState, EpmTargetPathSegment epmTargetPathSegment) { Debug.Assert(entryState != null, "entryState != null"); this.AssertXmlCondition(XmlNodeType.Element); Debug.Assert( this.XmlReader.LocalName == AtomConstants.AtomContributorElementName && this.XmlReader.NamespaceURI == AtomConstants.AtomNamespace, "Only atom:contributor elements can be read by this method."); if (this.ShouldReadCollectionElement(entryState.AtomEntryMetadata.Contributors.Any())) { AtomMetadataReaderUtils.AddContributorToEntryMetadata( entryState.AtomEntryMetadata, this.ReadAtomPersonConstruct(epmTargetPathSegment)); } else { this.XmlReader.Skip(); } }