/// <summary> /// Loads a notification event from XML. /// </summary> /// <param name="reader">The reader.</param> /// <param name="eventElementName">Name of the event XML element.</param> /// <param name="eventType">Type of the event.</param> /// <param name="notifications">Collection of notifications</param> private void LoadNotificationEventFromXml( EwsServiceXmlReader reader, string eventElementName, EventType eventType, NotificationGroup notifications) { DateTime timestamp = reader.ReadElementValue<DateTime>(XmlNamespace.Types, XmlElementNames.TimeStamp); NotificationEvent notificationEvent; reader.Read(); if (reader.LocalName == XmlElementNames.FolderId) { notificationEvent = new FolderEvent(eventType, timestamp); } else { notificationEvent = new ItemEvent(eventType, timestamp); } notificationEvent.LoadFromXml(reader, eventElementName); notifications.Events.Add(notificationEvent); }