コード例 #1
0
 public static bool TryCalculateConversationCreatorSidOnSaving(MailboxSession mailboxSession, ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage fixupStage, ConversationIndex conversationIndex, out byte[] conversationCreatorSid)
 {
     conversationCreatorSid = null;
     if (!ConversationCreatorHelper.SupportsConversationCreator(mailboxSession) || itemPropertyBag.GetValueOrDefault <bool>(InternalSchema.DeleteAfterSubmit, false))
     {
         return(false);
     }
     conversationCreatorSid = ConversationCreatorHelper.CalculateConversationCreatorSid(mailboxSession, itemPropertyBag, fixupStage, conversationIndex, ValueConvertor.ConvertValueToBinary(mailboxSession.MailboxOwner.Sid, null));
     return(conversationCreatorSid != null);
 }
コード例 #2
0
 public static bool TryCalculateConversationCreatorSidOnDeliveryProcessing(MailboxSession mailboxSession, ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage fixupStage, ConversationIndex conversationIndex, out byte[] conversationCreatorSid, out bool updateAllConversationMessages)
 {
     conversationCreatorSid        = null;
     updateAllConversationMessages = false;
     if (!ConversationCreatorHelper.SupportsConversationCreator(mailboxSession))
     {
         return(false);
     }
     byte[] valueOrDefault = itemPropertyBag.GetValueOrDefault <byte[]>(InternalSchema.SenderSID, null);
     return(ConversationCreatorHelper.TryCalculateConversationCreatorSid(mailboxSession, itemPropertyBag, fixupStage, conversationIndex, valueOrDefault, out conversationCreatorSid, out updateAllConversationMessages));
 }
コード例 #3
0
 public static bool TryCalculateConversationCreatorSidOnReplying(MailboxSession mailboxSession, ConversationIndex conversationIndex, out byte[] conversationCreatorSid)
 {
     conversationCreatorSid = null;
     if (!ConversationCreatorHelper.SupportsConversationCreator(mailboxSession))
     {
         return(false);
     }
     ConversationCreatorHelper.ConversationCreatorDefinitionData definitionData = new ConversationCreatorHelper.ConversationCreatorDefinitionData(mailboxSession, conversationIndex);
     conversationCreatorSid = ConversationCreatorHelper.CalculateConversationCreatorSid(definitionData, ConversationCreatorHelper.MessageDeliveryScenario.DeliveringNonRootMessage, null);
     return(conversationCreatorSid != null);
 }
コード例 #4
0
        private static bool SupportsConversationCreator(MailboxSession session)
        {
            if (session == null)
            {
                return(false);
            }
            if (!ConversationCreatorHelper.IsSessionLogonTypeSupported(session.LogonType))
            {
                return(false);
            }
            int?num = session.Mailbox.TryGetProperty(MailboxSchema.MailboxTypeDetail) as int?;

            return(num != null && StoreSession.IsGroupMailbox(num.Value));
        }
コード例 #5
0
 public void UpdateConversationMessages(ConversationIndex conversationIndex, byte[] conversationCreatorSid)
 {
     ConversationCreatorHelper.FixupConversationMessagesCreatorSid(this.mailboxSession as MailboxSession, conversationIndex, conversationCreatorSid);
 }
コード例 #6
0
 public bool TryCalculateOnReply(ConversationIndex conversationIndex, out byte[] conversationCreatorSid)
 {
     return(ConversationCreatorHelper.TryCalculateConversationCreatorSidOnReplying(this.mailboxSession as MailboxSession, conversationIndex, out conversationCreatorSid));
 }
コード例 #7
0
 public bool TryCalculateOnSave(ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage stage, ConversationIndex conversationIndex, CoreItemOperation operation, out byte[] conversationCreatorSid)
 {
     return(ConversationCreatorHelper.TryCalculateConversationCreatorSidOnSaving(this.mailboxSession as MailboxSession, itemPropertyBag, stage, conversationIndex, out conversationCreatorSid));
 }
コード例 #8
0
 public bool TryCalculateOnDelivery(ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage stage, ConversationIndex conversationIndex, out byte[] conversationCreatorSid, out bool updateAllConversationMessages)
 {
     return(ConversationCreatorHelper.TryCalculateConversationCreatorSidOnDeliveryProcessing(this.mailboxSession as MailboxSession, itemPropertyBag, stage, conversationIndex, out conversationCreatorSid, out updateAllConversationMessages));
 }
コード例 #9
0
 private static bool TryCalculateConversationCreatorSid(MailboxSession mailboxSession, ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage fixupStage, ConversationIndex conversationIndex, byte[] itemOwnerSID, out byte[] conversationCreatorSid, out bool updateAllConversationMessages)
 {
     ConversationCreatorHelper.ConversationCreatorDefinitionData definitionData          = new ConversationCreatorHelper.ConversationCreatorDefinitionData(mailboxSession, conversationIndex);
     ConversationCreatorHelper.MessageDeliveryScenario           messageDeliveryScenario = ConversationCreatorHelper.CalculateConversationDeliveryScenario(definitionData, itemPropertyBag, fixupStage);
     return(ConversationCreatorHelper.TryCalculateConversationCreatorSid(definitionData, messageDeliveryScenario, itemOwnerSID, out conversationCreatorSid, out updateAllConversationMessages));
 }
コード例 #10
0
 private static ConversationCreatorHelper.MessageDeliveryScenario CalculateConversationDeliveryScenario(ConversationCreatorHelper.ConversationCreatorDefinitionData definitionData, ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage fixupStage)
 {
     if (ConversationIndex.CheckStageValue(fixupStage, ConversationIndex.FixupStage.Error))
     {
         return(ConversationCreatorHelper.MessageDeliveryScenario.Unknown);
     }
     if (ConversationIndex.IsFixUpCreatingNewConversation(fixupStage))
     {
         return(ConversationCreatorHelper.MessageDeliveryScenario.DeliveringRootMessage);
     }
     if (definitionData.Conversation.RootMessageId == null)
     {
         ExTraceGlobals.StorageTracer.TraceDebug <string, string>(0L, "ConversationCreatorHelper::CalculateConversationDeliveryScenario : On some corner cases, the conversation is loaded without nodes and then root node is null. MessageClassConversationID:{0} FixupStage:{1}", definitionData.Conversation.ConversationId.ToString(), fixupStage.ToString());
         return(ConversationCreatorHelper.MessageDeliveryScenario.DeliveringRootMessage);
     }
     if (ConversationIndex.IsFixupAddingOutOfOrderMessageToConversation(fixupStage) && ConversationCreatorHelper.IsRootMessage(definitionData.Conversation, itemPropertyBag))
     {
         return(ConversationCreatorHelper.MessageDeliveryScenario.DeliveringOutOfOrderRootMessage);
     }
     return(ConversationCreatorHelper.MessageDeliveryScenario.Unknown);
 }