本文整理汇总了C#中EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone方法的典型用法代码示例。如果您正苦于以下问题:C# EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone方法的具体用法?C# EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone怎么用?C# EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EwsServiceXmlReader
的用法示例。
在下文中一共展示了EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryReadElementFromXml
/// <summary>
/// Tries to read element from XML.
/// </summary>
/// <param name="reader">The reader.</param>
/// <returns>True if appropriate element was read.</returns>
internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
{
switch (reader.LocalName)
{
case XmlElementNames.MeetingTime:
this.meetingTime = reader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone();
return true;
case XmlElementNames.IsWorkTime:
this.isWorkTime = reader.ReadElementValue<bool>();
return true;
case XmlElementNames.SuggestionQuality:
this.quality = reader.ReadElementValue<SuggestionQuality>();
return true;
case XmlElementNames.AttendeeConflictDataArray:
if (!reader.IsEmptyElement)
{
do
{
reader.Read();
if (reader.IsStartElement())
{
Conflict conflict = null;
switch (reader.LocalName)
{
case XmlElementNames.UnknownAttendeeConflictData:
conflict = new Conflict(ConflictType.UnknownAttendeeConflict);
break;
case XmlElementNames.TooBigGroupAttendeeConflictData:
conflict = new Conflict(ConflictType.GroupTooBigConflict);
break;
case XmlElementNames.IndividualAttendeeConflictData:
conflict = new Conflict(ConflictType.IndividualAttendeeConflict);
break;
case XmlElementNames.GroupAttendeeConflictData:
conflict = new Conflict(ConflictType.GroupConflict);
break;
default:
EwsUtilities.Assert(
false,
"TimeSuggestion.TryReadElementFromXml",
string.Format("The {0} element name does not map to any AttendeeConflict descendant.", reader.LocalName));
// The following line to please the compiler
break;
}
conflict.LoadFromXml(reader, reader.LocalName);
this.conflicts.Add(conflict);
}
}
while (!reader.IsEndElement(XmlNamespace.Types, XmlElementNames.AttendeeConflictDataArray));
}
return true;
default:
return false;
}
}
示例2: TryReadElementFromXml
/// <summary>
/// Attempts to read the element at the reader's current position.
/// </summary>
/// <param name="reader">The reader used to read the element.</param>
/// <returns>True if the element was read, false otherwise.</returns>
internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
{
switch (reader.LocalName)
{
case XmlElementNames.StartTime:
this.startTime = reader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone();
return true;
case XmlElementNames.EndTime:
this.endTime = reader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone();
return true;
case XmlElementNames.BusyType:
this.freeBusyStatus = reader.ReadElementValue<LegacyFreeBusyStatus>();
return true;
case XmlElementNames.CalendarEventDetails:
this.details = new CalendarEventDetails();
this.details.LoadFromXml(reader, reader.LocalName);
return true;
default:
return false;
}
}