Пример #1
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;
     }
 }