public bool ShouldAggregate(ICorePropertyBag message, IStorePropertyBag parentMessage, ConversationIndex.FixupStage previousStage) { if (AudienceBasedConversationAggregator.IsMessageCreatingNewConversation(parentMessage, previousStage)) { return(false); } if (!AudienceBasedConversationAggregator.SupportsSideConversation(parentMessage)) { return(false); } if (!this.IsSupportedItem(message) || !this.IsSupportedItem(parentMessage)) { return(false); } if (previousStage <= ConversationIndex.FixupStage.H13) { if (previousStage != ConversationIndex.FixupStage.Unknown && previousStage != ConversationIndex.FixupStage.H13) { return(true); } } else if (previousStage != ConversationIndex.FixupStage.Error && previousStage != ConversationIndex.FixupStage.S1 && previousStage != ConversationIndex.FixupStage.S2) { return(true); } return(false); }
protected override ConversationAggregationResult ConstructResult(ConversationIndex.FixupStage bySubjectResultingStage, ConversationIndex bySubjectResultingIndex, IStorePropertyBag parentItem) { ConversationAggregationResult conversationAggregationResult = base.ConstructResult(bySubjectResultingStage, bySubjectResultingIndex, parentItem); if (AudienceBasedConversationAggregator.IsMessageCreatingNewConversation(parentItem, bySubjectResultingStage)) { conversationAggregationResult.SupportsSideConversation = true; conversationAggregationResult.ConversationFamilyId = ConversationId.Create(bySubjectResultingIndex); } else { conversationAggregationResult.SupportsSideConversation = AudienceBasedConversationAggregator.SupportsSideConversation(parentItem); conversationAggregationResult.ConversationFamilyId = parentItem.GetValueOrDefault <ConversationId>(ItemSchema.ConversationFamilyId, null); } return(conversationAggregationResult); }