Пример #1
0
 /// <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.OofState:
             this.state = reader.ReadValue<OofState>();
             return true;
         case XmlElementNames.ExternalAudience:
             this.externalAudience = reader.ReadValue<OofExternalAudience>();
             return true;
         case XmlElementNames.Duration:
             this.duration = new TimeWindow();
             this.duration.LoadFromXml(reader);
             return true;
         case XmlElementNames.InternalReply:
             this.internalReply = new OofReply();
             this.internalReply.LoadFromXml(reader, reader.LocalName);
             return true;
         case XmlElementNames.ExternalReply:
             this.externalReply = new OofReply();
             this.externalReply.LoadFromXml(reader, reader.LocalName);
             return true;
         default:
             return false;
     }
 }
Пример #2
0
    bool TryReadElementFromXml(EwsServiceXmlReader reader)
    {
        switch (reader.LocalName)
        {
        case XmlElementNames.OofState:
            this.state = reader.ReadValue <OofState>();
            return(true);

        case XmlElementNames.ExternalAudience:
            this.externalAudience = reader.ReadValue <OofExternalAudience>();
            return(true);

        case XmlElementNames.Duration:
            this.duration = new TimeWindow();
            this.duration.LoadFromXml(reader);
            return(true);

        case XmlElementNames.InternalReply:
            this.internalReply = new OofReply();
            this.internalReply.LoadFromXml(reader, reader.LocalName);
            return(true);

        case XmlElementNames.ExternalReply:
            this.externalReply = new OofReply();
            this.externalReply.LoadFromXml(reader, reader.LocalName);
            return(true);

        default:
            return(false);
        }
    }
Пример #3
0
    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);
        }
    }
 /// <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;
     }
 }
Пример #5
0
 /// <summary>
 /// Reads text value from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal override void ReadTextValueFromXml(EwsServiceXmlReader reader)
 {
     this.text = reader.ReadValue();
 }
        /// <summary>
        /// Load from XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        internal override void InternalLoadFromXml(EwsServiceXmlReader reader)
        {
            base.InternalLoadFromXml(reader);

            this.folderId = new FolderId();
            this.folderId.LoadFromXml(reader, reader.LocalName);

            reader.Read();

            this.ParentFolderId = new FolderId();
            this.ParentFolderId.LoadFromXml(reader, XmlElementNames.ParentFolderId);

            switch (this.EventType)
            {
                case EventType.Moved:
                case EventType.Copied:
                    reader.Read();

                    this.oldFolderId = new FolderId();
                    this.oldFolderId.LoadFromXml(reader, reader.LocalName);

                    reader.Read();

                    this.OldParentFolderId = new FolderId();
                    this.OldParentFolderId.LoadFromXml(reader, reader.LocalName);
                    break;

                case EventType.Modified:
                    reader.Read();
                    if (reader.IsStartElement())
                    {
                        reader.EnsureCurrentNodeIsStartElement(XmlNamespace.Types, XmlElementNames.UnreadCount);
                        this.unreadCount = int.Parse(reader.ReadValue());
                    }
                    break;

                default:
                    break;
            }
        }
Пример #7
0
 /// <summary>
 /// Reads text value from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal override void ReadTextValueFromXml(EwsServiceXmlReader reader)
 {
     this.text = reader.ReadValue();
 }
Пример #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.SID:
             this.sID = reader.ReadValue();
             return true;
         case XmlElementNames.PrimarySmtpAddress:
             this.primarySmtpAddress = reader.ReadValue();
             return true;
         case XmlElementNames.DisplayName:
             this.displayName = reader.ReadValue();
             return true;
         case XmlElementNames.DistinguishedUser:
             this.standardUser = reader.ReadValue<StandardUser>();
             return true;
         default:
             return false;
     }
 }
 /// <summary>
 /// Reads text value from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal override void ReadTextValueFromXml(EwsServiceXmlReader reader)
 {
     this.content = System.Convert.FromBase64String(reader.ReadValue());
 }
 /// <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.Street:
             this.street = reader.ReadValue<string>();
             return true;
         case XmlElementNames.City:
             this.city = reader.ReadValue<string>();
             return true;
         case XmlElementNames.State:
             this.state = reader.ReadValue<string>();
             return true;
         case XmlElementNames.Country:
             this.country = reader.ReadValue<string>();
             return true;
         case XmlElementNames.PostalCode:
             this.postalCode = reader.ReadValue<string>();
             return true;
         case XmlElementNames.PostOfficeBox:
             this.postOfficeBox = reader.ReadValue<string>();
             return true;
         case XmlElementNames.PostalAddressType:
             this.type = reader.ReadValue<string>();
             return true;
         case XmlElementNames.Latitude:
             this.latitude = reader.ReadValue<double>();
             return true;
         case XmlElementNames.Longitude:
             this.longitude = reader.ReadValue<double>();
             return true;
         case XmlElementNames.Accuracy:
             this.accuracy = reader.ReadValue<double>();
             return true;
         case XmlElementNames.Altitude:
             this.altitude = reader.ReadValue<double>();
             return true;
         case XmlElementNames.AltitudeAccuracy:
             this.altitudeAccuracy = reader.ReadValue<double>();
             return true;
         case XmlElementNames.FormattedAddress:
             this.formattedAddress = reader.ReadValue<string>();
             return true;
         case XmlElementNames.LocationUri:
             this.uri = reader.ReadValue<string>();
             return true;
         case XmlElementNames.LocationSource:
             this.source = reader.ReadValue<LocationSource>();
             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.UserId:
             this.UserId = new UserId();
             this.UserId.LoadFromXml(reader, reader.LocalName);
             return true;
         case XmlElementNames.CanCreateItems:
             this.canCreateItems = reader.ReadValue<bool>();
             return true;
         case XmlElementNames.CanCreateSubFolders:
             this.canCreateSubFolders = reader.ReadValue<bool>();
             return true;
         case XmlElementNames.IsFolderOwner:
             this.isFolderOwner = reader.ReadValue<bool>();
             return true;
         case XmlElementNames.IsFolderVisible:
             this.isFolderVisible = reader.ReadValue<bool>();
             return true;
         case XmlElementNames.IsFolderContact:
             this.isFolderContact = reader.ReadValue<bool>();
             return true;
         case XmlElementNames.EditItems:
             this.editItems = reader.ReadValue<PermissionScope>();
             return true;
         case XmlElementNames.DeleteItems:
             this.deleteItems = reader.ReadValue<PermissionScope>();
             return true;
         case XmlElementNames.ReadItems:
             this.readItems = reader.ReadValue<FolderPermissionReadAccess>();
             return true;
         case XmlElementNames.PermissionLevel:
         case XmlElementNames.CalendarPermissionLevel:
             this.permissionLevel = reader.ReadValue<FolderPermissionLevel>();
             return true;
         default:
             return false;
     }
 }
Пример #12
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.LocationDisplayName:
             this.displayName = reader.ReadValue<string>();
             return true;
         case XmlElementNames.LocationAnnotation:
             this.annotation = reader.ReadValue<string>();
             return true;
         case XmlElementNames.PersonaPostalAddress:
             this.personaPostalAddress = new PersonaPostalAddress();
             this.personaPostalAddress.LoadFromXml(reader);
             this.personaPostalAddress.OnChange += new ComplexPropertyChangedDelegate(PersonaPostalAddress_OnChange);
             return true;
         default:
             return false;
     }
 }
 /// <summary>
 /// Reads text value from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal override void ReadTextValueFromXml(EwsServiceXmlReader reader)
 {
     this.retentionId = new Guid(reader.ReadValue());
 }
Пример #14
0
 void ReadTextValueFromXml(EwsServiceXmlReader reader)
 {
     this.value = reader.ReadValue();
 }