public new static PostItem Bind(StoreSession session, StoreId postId, ICollection <PropertyDefinition> propsToReturn) { return(ItemBuilder.ItemBind <PostItem>(session, postId, PostItemSchema.Instance, propsToReturn)); }
internal ConversationMembersQueryResult(MapiTable mapiTable, ICollection <PropertyDefinition> propertyDefinitions, IList <PropTag> alteredProperties, StoreSession session, bool isTableOwned, SortOrder sortOrder, AggregationExtension aggregationExtension) : base(mapiTable, PropertyDefinitionCollection.Merge <PropertyDefinition>(propertyDefinitions, ConversationMembersQueryResult.RequiredProperties), alteredProperties, session, isTableOwned, sortOrder) { this.originalProperties = propertyDefinitions; this.aggregationExtension = aggregationExtension; }
public new static OutlookSearchFolder Create(StoreSession session, StoreId parentFolderId, string displayName, CreateMode createMode) { throw new NotSupportedException(); }
public SiteMailboxSynchronizer(IExchangePrincipal siteMailboxPrincipal, string client) { if (!SiteMailboxSynchronizer.initialized) { lock (SiteMailboxSynchronizer.initSyncObject) { if (!SiteMailboxSynchronizer.initialized) { SiteMailboxSynchronizer.SyncInterval = TimeSpan.FromSeconds((double)StoreSession.GetConfigFromRegistry("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\SiteMailbox", "SyncInterval", 900, (int x) => x > 0)); SiteMailboxSynchronizer.initialized = true; } } } this.clientString = client + "_SiteMailboxSychronizer"; this.siteMailboxPrincipal = siteMailboxPrincipal; this.ScheduleSynchronization(TimeSpan.FromMilliseconds(0.0)); }
public void SpoolerLockMessage(StoreObjectId messageId, SpoolerMessageLockState lockState) { EnumValidator.ThrowIfInvalid <SpoolerMessageLockState>(lockState, "lockState"); Util.ThrowOnNullArgument(messageId, "messageId"); MapiStore.MessageLockState messageLockState = MapiStore.MessageLockState.Lock; switch (lockState) { case SpoolerMessageLockState.Lock: messageLockState = MapiStore.MessageLockState.Lock; break; case SpoolerMessageLockState.Unlock: messageLockState = MapiStore.MessageLockState.Unlock; break; case SpoolerMessageLockState.Finished: messageLockState = MapiStore.MessageLockState.Finished; break; } StoreSession storeSession = this.session; bool flag = false; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } this.session.Mailbox.MapiStore.SpoolerSetMessageLockState(messageId.ProviderLevelItemId, messageLockState); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotSetMessageLockState, ex, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiStore.SpoolerSetMessageLockState failed.", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotSetMessageLockState, ex2, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiStore.SpoolerSetMessageLockState failed.", new object[0]), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } }
public new static CalendarItemSeries Bind(StoreSession session, StoreId storeId, params PropertyDefinition[] propsToReturn) { return(CalendarItemSeries.Bind(session, storeId, (ICollection <PropertyDefinition>)propsToReturn)); }
static PublicFolderMailboxSynchronizer() { PublicFolderMailboxSynchronizer.SynchronizeHierarchyAfterSuccessInterval = TimeSpan.FromMilliseconds((double)StoreSession.GetConfigFromRegistry("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\PublicFolder", "MailboxSynchronizerSuccessInterval", 900000, (int x) => x >= 60000)); PublicFolderMailboxSynchronizer.SynchronizeHierarchyAfterFailureInterval = TimeSpan.FromMilliseconds((double)StoreSession.GetConfigFromRegistry("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\PublicFolder", "MailboxSynchronizerFailureInterval", 60000, (int x) => x >= 60000)); }
internal static Folder BindToSubfolderByName(StoreSession session, StoreObjectId containerId, string folderName, params PropertyDefinition[] propsToReturn) { Folder result; using (Folder folder = Folder.Bind(session, containerId)) { MapiFolder mapiFolder = null; Folder folder2 = null; bool flag = false; try { object thisObject = null; bool flag2 = false; try { if (session != null) { session.BeginMapiCall(); session.BeginServerHealthCall(); flag2 = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } mapiFolder = folder.MapiFolder.OpenSubFolderByName(folderName); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotOpenFolder, ex, session, thisObject, "{0}. MapiException = {1}.", new object[] { string.Format("DefaultFolderCreator::BindToSubfolderByName. Unable to open folder by name.", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotOpenFolder, ex2, session, thisObject, "{0}. MapiException = {1}.", new object[] { string.Format("DefaultFolderCreator::BindToSubfolderByName. Unable to open folder by name.", new object[0]), ex2 }); } finally { try { if (session != null) { session.EndMapiCall(); if (flag2) { session.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } using (MapiPropertyBag mapiPropertyBag = new MapiPropertyBag(session, mapiFolder)) { byte[] entryId = (byte[])mapiPropertyBag.GetProperties(new NativeStorePropertyDefinition[] { InternalSchema.EntryId })[0]; StoreObjectId folderObjectId = StoreObjectId.FromProviderSpecificId(entryId); folder2 = Folder.InternalBind <Folder>(session, mapiFolder, folderObjectId, null, propsToReturn); mapiPropertyBag.DetachMapiProp(); } flag = true; result = folder2; } finally { if (!flag) { Util.DisposeIfPresent(folder2); Util.DisposeIfPresent(mapiFolder); } } } return(result); }
private void RuleSaver(Rule[] mapiRules, Rules.RulesUpdaterDelegate rulesUpdater) { Rules.RunMapiCode(ServerStrings.ErrorSavingRules, delegate { StoreSession session = this.Folder.Session; object < > 4__this = this; bool flag = false; try { if (session != null) { session.BeginMapiCall(); session.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } try { rulesUpdater(mapiRules); } catch (MapiRetryableException ex) { if (!(ex is MapiExceptionNotEnoughMemory)) { if (!(ex is MapiExceptionRpcOutOfMemory)) { goto IL_C2; } } try { foreach (Rule rule in mapiRules) { rulesUpdater(new Rule[] { rule }); } goto IL_C4; } catch (MapiExceptionNotEnoughMemory innerException) { throw new RulesTooBigException(ServerStrings.ErrorSavingRules, innerException); } catch (MapiExceptionRpcOutOfMemory innerException2) { throw new RulesTooBigException(ServerStrings.ErrorSavingRules, innerException2); } goto IL_C2; IL_C4: goto IL_C6; IL_C2: throw; } IL_C6:; } catch (MapiPermanentException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.ErrorSavingRules, ex2, session, < > 4__this, "{0}. MapiException = {1}.", new object[] { string.Format("Rules::Save.", new object[0]), ex2 }); } catch (MapiRetryableException ex3) { throw StorageGlobals.TranslateMapiException(ServerStrings.ErrorSavingRules, ex3, session, < > 4__this, "{0}. MapiException = {1}.", new object[] { string.Format("Rules::Save.", new object[0]), ex3 }); } finally { try { if (session != null) { session.EndMapiCall(); if (flag) { session.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } });
internal static Rule LoadNeverClutterRule(object mapiThis, StoreSession session) { Rule result; using (Folder folder = Folder.Bind(session, session.GetDefaultFolderId(DefaultFolderType.Inbox))) { try { Rule[] array = null; bool flag = false; try { if (session != null) { session.BeginMapiCall(); session.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } array = folder.MapiFolder.GetRules(new PropTag[0]); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiRulesError, ex, session, mapiThis, "{0}. MapiException = {1}.", new object[] { string.Format("ClutterOverrideManager::LoadNeverClutterRule", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiRulesError, ex2, session, mapiThis, "{0}. MapiException = {1}.", new object[] { string.Format("ClutterOverrideManager::LoadNeverClutterRule", new object[0]), ex2 }); } finally { try { if (session != null) { session.EndMapiCall(); if (flag) { session.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } foreach (Rule rule in array) { if (rule.IsExtended && rule.Name == "Never Clutter Rule") { return(rule); } } } catch (StoragePermanentException) { } result = null; } return(result); }
internal static PropTag GetNeverClutterTag(object mapiThis, StoreSession session) { PropertyDefinition inferenceNeverClutterOverrideApplied = ItemSchema.InferenceNeverClutterOverrideApplied; NamedProp namedProp = new NamedProp(WellKnownPropertySet.Inference, inferenceNeverClutterOverrideApplied.Name); NamedProp namedProp2 = WellKnownNamedProperties.Find(namedProp); NamedProp namedProp3 = namedProp2 ?? namedProp; NamedProp[] np = new NamedProp[] { namedProp3 }; PropTag[] array = null; bool flag = false; try { if (session != null) { session.BeginMapiCall(); session.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } array = session.Mailbox.MapiStore.GetIDsFromNames(true, np); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiRulesError, ex, session, mapiThis, "{0}. MapiException = {1}.", new object[] { string.Format("ClutterOverrideManager::GetNeverClutterTag", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiRulesError, ex2, session, mapiThis, "{0}. MapiException = {1}.", new object[] { string.Format("ClutterOverrideManager::GetNeverClutterTag", new object[0]), ex2 }); } finally { try { if (session != null) { session.EndMapiCall(); if (flag) { session.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } return((array.Length > 0) ? (array[0] | (PropTag)11U) : PropTag.Null); }
internal ClutterOverrideManager(StoreSession session) { this.session = session; this.Load(); }
public static List <Guid> GetOnlineDatabase(string serverFqdn, List <Guid> guidDatabases) { List <Guid> list = new List <Guid>(); MdbStatus[] array = null; StoreSession storeSession = null; object thisObject = null; bool flag = false; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } try { using (ExRpcAdmin exRpcAdmin = ExRpcAdmin.Create("Client=MSExchangeRPC", serverFqdn, null, null, null)) { array = exRpcAdmin.ListMdbStatus(guidDatabases.ToArray()); } } catch (MapiExceptionNoAccess) { } } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotGetProperties, ex, storeSession, thisObject, "{0}. MapiException = {1}.", new object[] { string.Format("Cannot list mailbox database status.", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotGetProperties, ex2, storeSession, thisObject, "{0}. MapiException = {1}.", new object[] { string.Format("Cannot list mailbox database status.", new object[0]), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } if (array != null) { for (int i = 0; i < array.Length; i++) { if ((array[i].Status & MdbStatusFlags.Online) == MdbStatusFlags.Online) { list.Add(guidDatabases[i]); } } } return(list); }
public bool ShouldLogGroupOperation(COWTriggerAction operation, StoreSession sourceSession, StoreObjectId sourceFolderId, StoreSession destinationSession, StoreObjectId destinationFolderId, ICollection <StoreObjectId> itemIds) { return(false); }
// Token: 0x06001F31 RID: 7985 RVA: 0x000B32DC File Offset: 0x000B14DC public static void RenderCategories(OwaContext owaContext, TextWriter writer, IStorePropertyBag storePropertyBag, StoreSession storeSession) { if (owaContext == null) { throw new ArgumentNullException("owaContext"); } if (writer == null) { throw new ArgumentNullException("writer"); } if (storePropertyBag == null) { throw new ArgumentNullException("storePropertyBag"); } string[] property = ItemUtility.GetProperty <string[]>(storePropertyBag, ItemSchema.Categories, null); string value = owaContext.UserContext.IsRtl ? "rtl" : "ltr"; int num = 0; if (property != null && 0 < property.Length) { MasterCategoryList masterCategoryList = null; try { if (storeSession != null && owaContext.UserContext.IsOtherMailbox(storeSession)) { masterCategoryList = owaContext.UserContext.GetMasterCategoryList(storeSession as MailboxSession); } else { masterCategoryList = owaContext.UserContext.GetMasterCategoryList(); } } catch (QuotaExceededException ex) { ExTraceGlobals.CoreTracer.TraceDebug <string>(0L, "CategorySwatch.RenderCategories: Failed. Exception: {0}", ex.Message); return; } if (masterCategoryList != null) { for (int i = 0; i < property.Length; i++) { writer.Write("<span class=\"spanCatContainer\" dir=\""); writer.Write(value); writer.Write("\">"); CategorySwatch.RenderSwatch(writer, masterCategoryList[property[i]]); writer.Write(" "); Utilities.SanitizeHtmlEncode(property[i], writer); if (i < property.Length - 1) { writer.Write("; "); } writer.Write("</span><wbr>"); num++; } } } if (num == 0) { writer.Write("<span class=\"spanCatContainer catAfter\" dir=\""); writer.Write(value); writer.Write("\">"); int legacyColoredFlag = ItemUtility.GetLegacyColoredFlag(storePropertyBag); if (0 < legacyColoredFlag && legacyColoredFlag < CategorySwatch.FlagCategory.Length) { CategorySwatch.RenderSwatch(writer, (ItemColor)legacyColoredFlag); writer.Write("<span id=\"vaM\">"); writer.Write(SanitizedHtmlString.FromStringId(CategorySwatch.FlagCategory[legacyColoredFlag])); writer.Write("</span>"); } writer.Write("</span>"); } }
public bool Contains(long item) { StoreSession storeSession = this.session; bool flag = false; byte[] x; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } x = this.session.Mailbox.MapiStore.GlobalIdFromId(item); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.RuleHistoryError, ex, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("RuleHistory.Contains. item = {0}.", item), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.RuleHistoryError, ex2, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("RuleHistory.Contains. item = {0}.", item), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } ArrayComparer <byte> comparer = ArrayComparer <byte> .Comparer; foreach (byte[] y in this.gids) { if (comparer.Equals(x, y)) { return(true); } } return(false); }
public new static CalendarItemSeries Bind(StoreSession session, StoreId storeId) { return(CalendarItemSeries.Bind(session, storeId, null)); }
internal ReplyForwardCommon(Item originalItem, Item newItem, ReplyForwardConfiguration parameters, bool decodeSmime) { Util.ThrowOnNullArgument(parameters, "parameters"); if (decodeSmime && ObjectClass.IsSmime(originalItem.ClassName)) { if (parameters.ConversionOptionsForSmime == null || parameters.ConversionOptionsForSmime.IgnoreImceaDomain || parameters.ConversionOptionsForSmime.ImceaEncapsulationDomain == null) { throw new InvalidOperationException("Cannot decode SMIME without valid ConversionOptionsForSmime"); } this.originalItem = originalItem; MessageItem messageItem = originalItem as MessageItem; if (messageItem != null) { Item item = messageItem.FetchSmimeContent(parameters.ConversionOptionsForSmime.ImceaEncapsulationDomain); if (item != null) { this.originalItem = item; this.originalItem[InternalSchema.NormalizedSubjectInternal] = messageItem.GetValueOrDefault <string>(InternalSchema.NormalizedSubjectInternal, string.Empty); this.originalItem[InternalSchema.Sender] = messageItem.Sender; this.originalItem[InternalSchema.From] = messageItem.From; } } } else { this.originalItem = originalItem; } this.newItem = newItem; this.parameters = parameters; this.culture = ReplyForwardUtils.CalculateReplyForwardCulture(parameters.Culture, newItem); if (this.culture == null) { throw new InvalidOperationException("Forward message culture is unknown"); } this.FetchPropertiesFromOriginalItem(); if (originalItem is MessageItem) { if (originalItem.MapiMessage != null) { SetReadFlags readFlag = parameters.ShouldSuppressReadReceipt ? SetReadFlags.SuppressReceipt : SetReadFlags.None; try { StoreSession session = originalItem.Session; bool flag = false; try { if (session != null) { session.BeginMapiCall(); session.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } originalItem.MapiMessage.SetReadFlag(readFlag); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotSetReadFlags, ex, session, this, "{0}. MapiException = {1}.", new object[] { string.Format("ReplyForwardCommon::ctor.", new object[0]), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotSetReadFlags, ex2, session, this, "{0}. MapiException = {1}.", new object[] { string.Format("ReplyForwardCommon::ctor.", new object[0]), ex2 }); } finally { try { if (session != null) { session.EndMapiCall(); if (flag) { session.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } } catch (StoragePermanentException) { } catch (StorageTransientException) { } } (this.originalItem as MessageItem).IsRead = true; } else if (this.originalItem is CalendarItemOccurrence) { this.parentPropValues[ParentPropertyIndex.IsRecurring] = true; this.parentPropValues[ParentPropertyIndex.AppointmentRecurring] = false; this.parentPropValues[ParentPropertyIndex.RecurrenceType] = 0; this.parentPropValues[ParentPropertyIndex.TimeZoneBlob] = new PropertyError(InternalSchema.TimeZoneBlob, PropertyErrorCode.NotFound); this.parentPropValues[ParentPropertyIndex.AppointmentRecurrenceBlob] = new PropertyError(InternalSchema.AppointmentRecurrenceBlob, PropertyErrorCode.NotFound); this.parentPropValues[ParentPropertyIndex.IsException] = true; if (string.IsNullOrEmpty(this.parentPropValues[ParentPropertyIndex.RecurrencePattern] as string)) { CalendarItemOccurrence calendarItemOccurrence = this.originalItem as CalendarItemOccurrence; this.parentPropValues[ParentPropertyIndex.RecurrencePattern] = calendarItemOccurrence.OccurrencePropertyBag.MasterCalendarItem.GenerateWhen(); } } string valueOrDefault = originalItem.GetValueOrDefault <string>(InternalSchema.ItemClass, string.Empty); this.originalItemSigned = (ObjectClass.IsOfClass(valueOrDefault, "IPM.Note.Secure.Sign") || ObjectClass.IsSmimeClearSigned(valueOrDefault)); if (!this.originalItemSigned) { this.originalItemEncrypted = (ObjectClass.IsOfClass(valueOrDefault, "IPM.Note.Secure") || ObjectClass.IsSmime(valueOrDefault)); } string valueOrDefault2 = originalItem.GetValueOrDefault <string>(InternalSchema.ContentClass, string.Empty); this.originalItemIrm = ObjectClass.IsRightsManagedContentClass(valueOrDefault2); }
public new static CalendarItemSeries Bind(StoreSession session, StoreId storeId, ICollection <PropertyDefinition> propsToReturn) { return(ItemBuilder.ItemBind <CalendarItemSeries>(session, storeId, CalendarItemSeriesSchema.Instance, propsToReturn)); }
// Token: 0x06000CB0 RID: 3248 RVA: 0x00034CCF File Offset: 0x00032ECF public static bool SetStoreSessionClientIPEndpointsFromHttpRequest(StoreSession session, HttpRequest httpRequest) { return(GccUtils.SetStoreSessionClientIPEndpointsFromHttpRequest(session, httpRequest, false)); }
internal override QueryFilter GetQueryFilter(StoreSession storeSession) { return(new NullFilter()); }
public bool SkipItemOperation(COWSettings settings, IDumpsterItemOperations dumpster, COWTriggerAction operation, COWTriggerActionState state, StoreSession session, StoreObjectId itemId, CoreItem item, bool onBeforeNotification, bool onDumpster, bool success, CallbackContext callbackContext) { EnumValidator.ThrowIfInvalid <COWTriggerAction>(operation, "operation"); EnumValidator.ThrowIfInvalid <COWTriggerActionState>(state, "state"); if (onBeforeNotification && COWTriggerAction.Update == operation) { if (settings.CurrentFolderId != null) { if (settings.CurrentFolderId.Equals(dumpster.AuditsFolderId)) { throw new AccessDeniedException(ServerStrings.ExAuditsUpdateDenied); } if (settings.CurrentFolderId.Equals(dumpster.AdminAuditLogsFolderId)) { throw new AccessDeniedException(ServerStrings.ExAdminAuditLogsUpdateDenied); } if (dumpster.IsAuditFolder(settings.CurrentFolderId)) { throw new AccessDeniedException((dumpster.AuditsFolderId != null) ? ServerStrings.ExAuditsUpdateDenied : ServerStrings.ExAdminAuditLogsUpdateDenied); } } else if (itemId != null) { StoreObjectId parentIdFromMessageId = IdConverter.GetParentIdFromMessageId(itemId); if (parentIdFromMessageId.Equals(dumpster.AuditsFolderId)) { throw new AccessDeniedException(ServerStrings.ExAuditsUpdateDenied); } if (parentIdFromMessageId.Equals(dumpster.AdminAuditLogsFolderId)) { throw new AccessDeniedException(ServerStrings.ExAdminAuditLogsUpdateDenied); } if (dumpster.IsAuditFolder(settings.CurrentFolderId)) { throw new AccessDeniedException((dumpster.AuditsFolderId != null) ? ServerStrings.ExAuditsUpdateDenied : ServerStrings.ExAdminAuditLogsUpdateDenied); } } } return(true); }
internal SpoolerManager(StoreSession session) { this.session = session; }
public void GroupOperation(COWSettings settings, IDumpsterItemOperations dumpster, COWTriggerAction operation, FolderChangeOperationFlags flags, StoreSession sourceSession, StoreSession destinationSession, StoreObjectId destinationFolderId, StoreObjectId[] itemIds, GroupOperationResult result, bool onBeforeNotification, CallbackContext callbackContext) { EnumValidator.ThrowIfInvalid <COWTriggerAction>(operation, "operation"); EnumValidator.ThrowIfInvalid <FolderChangeOperationFlags>(flags, "flags"); }
internal StoreObjectPropertyBag(StoreSession session, MapiProp mapiProp, ICollection <PropertyDefinition> autoloadProperties) : this(session, mapiProp, autoloadProperties, true) { }
public void ItemOperation(COWSettings settings, IDumpsterItemOperations dumpster, COWTriggerAction operation, COWTriggerActionState state, StoreSession session, StoreObjectId itemId, CoreItem item, CoreFolder folder, bool onBeforeNotification, OperationResult result, CallbackContext callbackContext) { EnumValidator.ThrowIfInvalid <COWTriggerAction>(operation, "operation"); EnumValidator.ThrowIfInvalid <OperationResult>(result, "result"); EnumValidator.ThrowIfInvalid <COWTriggerActionState>(state, "state"); }
public new static OutlookSearchFolder Create(StoreSession session, StoreId parentFolderId) { throw new NotSupportedException(); }
public CowClientOperationSensitivity SkipGroupOperation(COWSettings settings, IDumpsterItemOperations dumpster, COWTriggerAction operation, FolderChangeOperationFlags flags, StoreSession sourceSession, StoreSession destinationSession, StoreObjectId sourceFolderId, StoreObjectId destinationFolderId, ICollection <StoreObjectId> itemIds, bool onBeforeNotification, bool onDumpster, CallbackContext callbackContext) { EnumValidator.ThrowIfInvalid <COWTriggerAction>(operation, "operation"); EnumValidator.ThrowIfInvalid <FolderChangeOperationFlags>(flags, "flags"); MailboxSession mailboxSession = sourceSession as MailboxSession; if (mailboxSession == null) { return(CowClientOperationSensitivity.Skip); } if (onBeforeNotification && (COWTriggerAction.Copy == operation || COWTriggerAction.HardDelete == operation || COWTriggerAction.Move == operation || COWTriggerAction.MoveToDeletedItems == operation || COWTriggerAction.SoftDelete == operation)) { StoreObjectId auditsFolderId = dumpster.AuditsFolderId; StoreObjectId adminAuditLogsFolderId = dumpster.AdminAuditLogsFolderId; if (settings.CurrentFolderId != null && (COWTriggerAction.HardDelete != operation || LogonType.SystemService != sourceSession.LogonType || !settings.IsMrmAction())) { this.CheckAccessOnAuditFolders(mailboxSession, settings.CurrentFolderId, dumpster, false); } if (itemIds != null) { foreach (StoreObjectId storeObjectId in itemIds) { if (storeObjectId != null) { if (storeObjectId.IsMessageId) { if (settings.CurrentFolderId == null && (COWTriggerAction.HardDelete != operation || LogonType.SystemService != sourceSession.LogonType || !settings.IsMrmAction())) { StoreObjectId parentIdFromMessageId = IdConverter.GetParentIdFromMessageId(storeObjectId); if (parentIdFromMessageId.Equals(auditsFolderId)) { throw new AccessDeniedException(ServerStrings.ExAuditsUpdateDenied); } if (parentIdFromMessageId.Equals(adminAuditLogsFolderId)) { throw new AccessDeniedException(ServerStrings.ExAdminAuditLogsUpdateDenied); } if (dumpster.IsAuditFolder(parentIdFromMessageId)) { throw new AccessDeniedException((auditsFolderId != null) ? ServerStrings.ExAuditsUpdateDenied : ServerStrings.ExAdminAuditLogsUpdateDenied); } } } else if (storeObjectId.IsFolderId) { this.CheckAccessOnAuditFolders(mailboxSession, storeObjectId, dumpster, true); } } } } } return(CowClientOperationSensitivity.Skip); }
public new static OutlookSearchFolder Bind(StoreSession session, StoreId folderId) { return(OutlookSearchFolder.Bind(session, folderId, null)); }
public new static PostItem Bind(StoreSession session, StoreId postId) { return(PostItem.Bind(session, postId, null)); }