Пример #1
0
        public virtual UserConfiguration GetFolderAssociatedItem(ExchangeService ewsSession, Folder faiFolder, EwsFolderAssociateItemType itemType)
        {
            if (!this.VerifyItemFolderAssociation(itemType, faiFolder))
            {
                throw new InvalidOperationException(
                    string.Format("Item '{0}' is not expected to be located in folder '{1}'", itemType.ToString(), faiFolder.DisplayName)
                );
            }

            UserConfiguration userConfig = UserConfiguration.Bind(ewsSession, itemType.ToString(), faiFolder.Id, UserConfigurationProperties.All);

            return userConfig;
        }
Пример #2
0
 public virtual UserConfiguration GetFolderAssociatedItem(ExchangeService ewsSession, FolderId faiFolder,
     EwsFolderAssociateItemType itemType)
 {
     try
     {
         UserConfiguration userConfig = UserConfiguration.Bind(ewsSession, itemType.ToString(), faiFolder, UserConfigurationProperties.All);
         return userConfig;
     }
     catch (Exception)
     {
         throw;
     }
 }