Ejemplo n.º 1
0
        /// <summary>
        /// Returns all items by <paramref name="filter"/> from <paramref name="folder"/>. Recurring apointments not included.
        /// </summary>
        /// <param name="folder"><see cref=" Exchange.Folder"/> instance.</param>
        /// <param name="filter"><see cref=" Exchange.SearchFilter"/> instance.</param>
        /// <returns><see cref="Exchange.Item"/> collection.</returns>
        protected IEnumerable <Exchange.Item> GetCalendarItems(Exchange.Folder folder, Exchange.SearchFilter filter)
        {
            var itemView = new Exchange.ItemView(PageItemCount);

            Exchange.FindItemsResults <Exchange.Item> itemCollection;
            do
            {
                itemCollection = folder.ReadItems(filter, itemView);
                foreach (var item in itemCollection)
                {
                    yield return(item);
                }
            } while (itemCollection.MoreAvailable);
        }
 /// <summary>
 /// Gets Items from <see cref="folder"/> by <see cref="filterCollection"/>
 /// </summary>
 /// <param name="folder">Exchange folder.</param>
 /// <param name="filterCollection">Filter collection.</param>
 /// <param name="itemView">Represents the view settings in a folder search operation.</param>
 /// <returns></returns>
 public virtual Exchange.FindItemsResults <Exchange.Item> GetFolderItemsByFilter(Exchange.Folder folder,
                                                                                 Exchange.SearchFilter.SearchFilterCollection filterCollection, Exchange.ItemView itemView)
 {
     return(folder.ReadItems(filterCollection, itemView));
 }