本文整理汇总了C#中EwsServiceXmlReader.TryReadValue方法的典型用法代码示例。如果您正苦于以下问题:C# EwsServiceXmlReader.TryReadValue方法的具体用法?C# EwsServiceXmlReader.TryReadValue怎么用?C# EwsServiceXmlReader.TryReadValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EwsServiceXmlReader
的用法示例。
在下文中一共展示了EwsServiceXmlReader.TryReadValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryReadElementFromXml
/// <summary>
/// Tries to read element from XML.
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>True if element was read.</returns>
internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
{
switch (reader.LocalName)
{
case XmlElementNames.CanDelete:
this.canDelete = reader.ReadValue<bool>();
return true;
case XmlElementNames.CanRenameOrMove:
this.canRenameOrMove = reader.ReadValue<bool>();
return true;
case XmlElementNames.MustDisplayComment:
this.mustDisplayComment = reader.ReadValue<bool>();
return true;
case XmlElementNames.HasQuota:
this.hasQuota = reader.ReadValue<bool>();
return true;
case XmlElementNames.IsManagedFoldersRoot:
this.isManagedFoldersRoot = reader.ReadValue<bool>();
return true;
case XmlElementNames.ManagedFolderId:
this.managedFolderId = reader.ReadValue();
return true;
case XmlElementNames.Comment:
reader.TryReadValue(ref this.comment);
return true;
case XmlElementNames.StorageQuota:
this.storageQuota = reader.ReadValue<int>();
return true;
case XmlElementNames.FolderSize:
this.folderSize = reader.ReadValue<int>();
return true;
case XmlElementNames.HomePage:
reader.TryReadValue(ref this.homePage);
return true;
default:
return false;
}
}