当前位置: 首页>>代码示例>>C#>>正文


C# EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone方法代码示例

本文整理汇总了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;
            }
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:66,代码来源:TimeSuggestion.cs

示例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;
     }
 }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:26,代码来源:CalendarEvent.cs


注:本文中的EwsServiceXmlReader.ReadElementValueAsUnbiasedDateTimeScopedToServiceTimeZone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。