public QueryResult FolderQuery(FolderQueryFlags queryFlags, QueryFilter queryFilter, SortBy[] sortColumns, params PropertyDefinition[] dataColumns) { return(this.FolderQuery(queryFlags, queryFilter, sortColumns, (ICollection <PropertyDefinition>)dataColumns)); }
public QueryResult FolderQuery(FolderQueryFlags queryFlags, QueryFilter queryFilter, SortBy[] sortColumns, ICollection <PropertyDefinition> dataColumns) { EnumValidator.ThrowIfInvalid <FolderQueryFlags>(queryFlags, "queryFlags"); Util.ThrowOnNullArgument(dataColumns, "dataColumns"); HierarchyTableFlags hierarchyTableFlags = HierarchyTableFlags.None; if ((queryFlags & FolderQueryFlags.NoNotifications) == FolderQueryFlags.NoNotifications) { hierarchyTableFlags |= HierarchyTableFlags.NoNotifications; } if ((queryFlags & FolderQueryFlags.SuppressNotificationsOnMyActions) == FolderQueryFlags.SuppressNotificationsOnMyActions) { hierarchyTableFlags |= HierarchyTableFlags.SuppressNotificationsOnMyActions; } if ((queryFlags & FolderQueryFlags.SoftDeleted) == FolderQueryFlags.SoftDeleted) { hierarchyTableFlags |= HierarchyTableFlags.ShowSoftDeletes; } if ((queryFlags & FolderQueryFlags.DeepTraversal) == FolderQueryFlags.DeepTraversal) { hierarchyTableFlags |= HierarchyTableFlags.ConvenientDepth; } else { hierarchyTableFlags |= HierarchyTableFlags.DeferredErrors; } if ((queryFlags & FolderQueryFlags.DeepTraversal) == FolderQueryFlags.DeepTraversal && sortColumns != null) { throw new NotSupportedException(ServerStrings.ExSortNotSupportedInDeepTraversalQuery); } MapiTable mapiTable = null; QueryResult queryResult = null; bool flag = false; QueryResult result; try { StoreSession storeSession = this.session; bool flag2 = false; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag2 = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } mapiTable = this.MapiFolder.GetHierarchyTable(hierarchyTableFlags); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotGetHierarchyTable, ex, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("Folder::FolderQuery.", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotGetHierarchyTable, ex2, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("Folder::FolderQuery.", new object[0]), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag2) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } queryResult = this.CreateQueryResult(mapiTable, queryFilter, sortColumns, dataColumns); flag = true; result = queryResult; } finally { if (!flag) { if (queryResult != null) { queryResult.Dispose(); queryResult = null; } if (mapiTable != null) { mapiTable.Dispose(); mapiTable = null; } } } return(result); }
public virtual IQueryResult IFolderQuery(FolderQueryFlags queryFlags, QueryFilter queryFilter, SortBy[] sortColumns, params PropertyDefinition[] dataColumns) { throw new NotImplementedException(); }