/// <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.HasLocationChanged:
                this.hasLocationChanged = reader.ReadElementValue <bool>();
                return(true);

            case XmlElementNames.Location:
                this.location = reader.ReadElementValue();
                return(true);

            case XmlElementNames.HasStartTimeChanged:
                this.hasStartTimeChanged = reader.ReadElementValue <bool>();
                return(true);

            case XmlElementNames.Start:
                this.start = reader.ReadElementValueAsDateTime().Value;
                return(true);

            case XmlElementNames.HasEndTimeChanged:
                this.hasEndTimeChanged = reader.ReadElementValue <bool>();
                return(true);

            case XmlElementNames.End:
                this.end = reader.ReadElementValueAsDateTime().Value;
                return(true);

            default:
                return(false);
            }
        }
        /// <summary>
        /// Tries to read element from XML.
        /// </summary>
        /// <param name="reader">XML reader</param>
        /// <returns>Whether the element was read</returns>
        internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
        {
            switch (reader.LocalName)
            {
            case XmlElementNames.InsightSource:
                this.InsightSource = reader.ReadElementValue <InsightSourceType>();
                break;

            case XmlElementNames.StartTime:
                this.startTime = reader.ReadElementValueAsDateTime(XmlNamespace.Types, XmlElementNames.StartTime).Value;
                break;

            case XmlElementNames.EndTime:
                this.endTime = reader.ReadElementValueAsDateTime(XmlNamespace.Types, XmlElementNames.EndTime).Value;
                break;

            case XmlElementNames.Culture:
                this.culture = reader.ReadElementValue();
                break;

            case XmlElementNames.Message:
                this.message = reader.ReadElementValue();
                break;

            default:
                return(false);
            }

            return(true);
        }
예제 #3
0
        /// <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.ItemId:
                this.itemId = new ItemId();
                this.itemId.LoadFromXml(reader, reader.LocalName);
                return(true);

            case XmlElementNames.Start:
                this.start = reader.ReadElementValueAsDateTime().Value;
                return(true);

            case XmlElementNames.End:
                this.end = reader.ReadElementValueAsDateTime().Value;
                return(true);

            case XmlElementNames.OriginalStart:
                this.originalStart = reader.ReadElementValueAsDateTime().Value;
                return(true);

            default:
                return(false);
            }
        }
        /// <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.NlgAttendees:
                this.Attendees = new EmailUserEntityCollection();
                this.Attendees.LoadFromXml(reader, XmlNamespace.Types, XmlElementNames.NlgAttendees);
                return(true);

            case XmlElementNames.NlgLocation:
                this.Location = reader.ReadElementValue();
                return(true);

            case XmlElementNames.NlgSubject:
                this.Subject = reader.ReadElementValue();
                return(true);

            case XmlElementNames.NlgMeetingString:
                this.MeetingString = reader.ReadElementValue();
                return(true);

            case XmlElementNames.NlgStartTime:
                this.StartTime = reader.ReadElementValueAsDateTime();
                return(true);

            case XmlElementNames.NlgEndTime:
                this.EndTime = reader.ReadElementValueAsDateTime();
                return(true);

            default:
                return(base.TryReadElementFromXml(reader));
            }
        }
예제 #5
0
        /// <summary>
        /// Loads from XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        internal void LoadFromXml(EwsServiceXmlReader reader)
        {
            reader.EnsureCurrentNodeIsStartElement(XmlNamespace.Types, XmlElementNames.Duration);

            this.startTime = reader.ReadElementValueAsDateTime(XmlNamespace.Types, XmlElementNames.StartTime).Value;
            this.endTime   = reader.ReadElementValueAsDateTime(XmlNamespace.Types, XmlElementNames.EndTime).Value;

            reader.ReadEndElement(XmlNamespace.Types, XmlElementNames.Duration);
        }
        /// <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.StartDateTime:
                this.start = reader.ReadElementValueAsDateTime();
                return(true);

            case XmlElementNames.EndDateTime:
                this.end = reader.ReadElementValueAsDateTime();
                return(true);

            default:
                return(false);
            }
        }
예제 #7
0
        /// <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.AttachmentId:
                this.id = reader.ReadAttributeValue(XmlAttributeNames.Id);

                if (this.Owner != null)
                {
                    string rootItemChangeKey = reader.ReadAttributeValue(XmlAttributeNames.RootItemChangeKey);

                    if (!string.IsNullOrEmpty(rootItemChangeKey))
                    {
                        this.Owner.RootItemId.ChangeKey = rootItemChangeKey;
                    }
                }
                reader.ReadEndElementIfNecessary(XmlNamespace.Types, XmlElementNames.AttachmentId);
                return(true);

            case XmlElementNames.Name:
                this.name = reader.ReadElementValue();
                return(true);

            case XmlElementNames.ContentType:
                this.contentType = reader.ReadElementValue();
                return(true);

            case XmlElementNames.ContentId:
                this.contentId = reader.ReadElementValue();
                return(true);

            case XmlElementNames.ContentLocation:
                this.contentLocation = reader.ReadElementValue();
                return(true);

            case XmlElementNames.Size:
                this.size = reader.ReadElementValue <int>();
                return(true);

            case XmlElementNames.LastModifiedTime:
                this.lastModifiedTime = reader.ReadElementValueAsDateTime().Value;
                return(true);

            case XmlElementNames.IsInline:
                this.isInline = reader.ReadElementValue <bool>();
                return(true);

            default:
                return(false);
            }
        }
예제 #8
0
        /// <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.FlagStatus:
                this.flagStatus = reader.ReadElementValue <ItemFlagStatus>();
                return(true);

            case XmlElementNames.StartDate:
                this.startDate = reader.ReadElementValueAsDateTime().Value;
                return(true);

            case XmlElementNames.DueDate:
                this.dueDate = reader.ReadElementValueAsDateTime().Value;
                return(true);

            case XmlElementNames.CompleteDate:
                this.completeDate = reader.ReadElementValueAsDateTime().Value;
                return(true);

            default:
                return(false);
            }
        }
        /// <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)
        {
            if (base.TryReadElementFromXml(reader))
            {
                return(true);
            }
            else
            {
                switch (reader.LocalName)
                {
                case XmlElementNames.EndDate:
                    this.endDate = reader.ReadElementValueAsDateTime().Value;
                    return(true);

                default:
                    return(false);
                }
            }
        }
예제 #10
0
        /// <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.Mailbox:
                this.LoadFromXml(reader, reader.LocalName);
                return(true);

            case XmlElementNames.ResponseType:
                this.responseType = reader.ReadElementValue <MeetingResponseType>();
                return(true);

            case XmlElementNames.LastResponseTime:
                this.lastResponseTime = reader.ReadElementValueAsDateTime();
                return(true);

            default:
                return(base.TryReadElementFromXml(reader));
            }
        }
예제 #11
0
        /// <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.IsUndecidedApprovalRequest:
                this.isUndecidedApprovalRequest = reader.ReadElementValue <bool>();
                return(true);

            case XmlElementNames.ApprovalDecision:
                this.approvalDecision = reader.ReadElementValue <int>();
                return(true);

            case XmlElementNames.ApprovalDecisionMaker:
                this.approvalDecisionMaker = reader.ReadElementValue <string>();
                return(true);

            case XmlElementNames.ApprovalDecisionTime:
                this.approvalDecisionTime = reader.ReadElementValueAsDateTime().Value;
                return(true);

            default:
                return(false);
            }
        }
 /// <summary>
 /// Reads response elements from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal override void ReadElementsFromXml(EwsServiceXmlReader reader)
 {
     base.ReadElementsFromXml(reader);
     this.passwordExpirationDate = reader.ReadElementValueAsDateTime(XmlNamespace.NotSpecified, XmlElementNames.PasswordExpirationDate);
 }