public static G RunQueryOnAllItemsFolder <G>(MailboxSession session, AllItemsFolderHelper.SupportedSortBy supportedSortBy, object seekToValue, G defaultValue, AllItemsFolderHelper.DoQueryProcessing <G> queryProcessor, ICollection <PropertyDefinition> properties, ItemQueryType itemQueryType)
 {
     return(AllItemsFolderHelper.RunQueryOnAllItemsFolder <G>(session, supportedSortBy, delegate(QueryResult queryResult)
     {
         if (queryResult.SeekToCondition(SeekReference.OriginBeginning, new ComparisonFilter(ComparisonOperator.Equal, AllItemsFolderHelper.sortOrderMap[supportedSortBy][0].ColumnDefinition, seekToValue)))
         {
             return queryProcessor(queryResult);
         }
         return defaultValue;
     }, properties, itemQueryType));
 }
        public static G RunQueryOnAllItemsFolder <G>(MailboxSession session, AllItemsFolderHelper.SupportedSortBy supportedSortBy, AllItemsFolderHelper.DoQueryProcessing <G> queryProcessor, ICollection <PropertyDefinition> properties, ItemQueryType itemQueryType)
        {
            AllItemsFolderHelper.CheckAndCreateDefaultFolders(session);
            G result;

            using (SearchFolder searchFolder = SearchFolder.Bind(session, DefaultFolderType.AllItems))
            {
                using (QueryResult queryResult = searchFolder.ItemQuery(itemQueryType, null, AllItemsFolderHelper.sortOrderMap[supportedSortBy], properties))
                {
                    result = queryProcessor(queryResult);
                }
            }
            return(result);
        }
Exemple #3
0
 public G RunQueryOnAllItemsFolder <G>(IMailboxSession session, AllItemsFolderHelper.SupportedSortBy supportedSortBy, AllItemsFolderHelper.DoQueryProcessing <G> queryProcessor, ICollection <PropertyDefinition> properties)
 {
     return(AllItemsFolderHelper.RunQueryOnAllItemsFolder <G>((MailboxSession)session, supportedSortBy, queryProcessor, properties));
 }
Exemple #4
0
 public T RunQueryOnAllItemsFolder <T>(IMailboxSession session, AllItemsFolderHelper.SupportedSortBy supportedSortBy, object seekToValue, T defaultValue, AllItemsFolderHelper.DoQueryProcessing <T> queryProcessor, ICollection <PropertyDefinition> properties)
 {
     return(AllItemsFolderHelper.RunQueryOnAllItemsFolder <T>((MailboxSession)session, supportedSortBy, seekToValue, defaultValue, queryProcessor, properties));
 }
 public static G RunQueryOnAllItemsFolder <G>(MailboxSession session, AllItemsFolderHelper.SupportedSortBy supportedSortBy, object seekToValue, G defaultValue, AllItemsFolderHelper.DoQueryProcessing <G> queryProcessor, ICollection <PropertyDefinition> properties)
 {
     return(AllItemsFolderHelper.RunQueryOnAllItemsFolder <G>(session, supportedSortBy, seekToValue, defaultValue, queryProcessor, properties, ItemQueryType.None));
 }