本文整理汇总了C#中EwsServiceXmlReader.ReadNullableAttributeValue方法的典型用法代码示例。如果您正苦于以下问题:C# EwsServiceXmlReader.ReadNullableAttributeValue方法的具体用法?C# EwsServiceXmlReader.ReadNullableAttributeValue怎么用?C# EwsServiceXmlReader.ReadNullableAttributeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EwsServiceXmlReader
的用法示例。
在下文中一共展示了EwsServiceXmlReader.ReadNullableAttributeValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadElementsFromXml
/// <summary>
/// Reads response elements from XML.
/// </summary>
/// <param name="reader">The reader.</param>
internal override void ReadElementsFromXml(EwsServiceXmlReader reader)
{
reader.ReadStartElement(XmlNamespace.Messages, XmlElementNames.RootFolder);
this.results.TotalCount = reader.ReadAttributeValue<int>(XmlAttributeNames.TotalItemsInView);
this.results.MoreAvailable = !reader.ReadAttributeValue<bool>(XmlAttributeNames.IncludesLastItemInRange);
// Ignore IndexedPagingOffset attribute if MoreAvailable is false.
this.results.NextPageOffset = results.MoreAvailable ? reader.ReadNullableAttributeValue<int>(XmlAttributeNames.IndexedPagingOffset) : null;
reader.ReadStartElement(XmlNamespace.Types, XmlElementNames.Folders);
if (!reader.IsEmptyElement)
{
do
{
reader.Read();
if (reader.NodeType == XmlNodeType.Element)
{
Folder folder = EwsUtilities.CreateEwsObjectFromXmlElementName<Folder>(reader.Service, reader.LocalName);
if (folder == null)
{
reader.SkipCurrentElement();
}
else
{
folder.LoadFromXml(
reader,
true, /* clearPropertyBag */
this.propertySet,
true /* summaryPropertiesOnly */);
this.results.Folders.Add(folder);
}
}
}
while (!reader.IsEndElement(XmlNamespace.Types, XmlElementNames.Folders));
}
reader.ReadEndElement(XmlNamespace.Messages, XmlElementNames.RootFolder);
}