private AggregationByParticipantProcessor.DisplayNameCheckResult TryCheckParticipantsRemovedUsingDisplayNames(IConversationAggregationLogger logger, ICorePropertyBag deliveredItemPropertyBag, IStorePropertyBag parentItemPropertyBag, out bool participantsRemoved) { HashSet <string> hashSet = null; HashSet <string> hashSet2 = null; AggregationByParticipantProcessor.DisplayNameCheckResult displayNameCheckResult = AggregationByParticipantProcessor.DisplayNameCheckResult.Success; participantsRemoved = false; if (this.ReplyAllExtractor.TryRetrieveReplyAllDisplayNames(parentItemPropertyBag, out hashSet2)) { hashSet = this.ReplyAllExtractor.RetrieveReplyAllDisplayNames(deliveredItemPropertyBag); if (hashSet.Count < hashSet2.Count) { participantsRemoved = true; displayNameCheckResult = AggregationByParticipantProcessor.DisplayNameCheckResult.Success; } else { hashSet2.ExceptWith(hashSet); if (hashSet2.Any <string>()) { displayNameCheckResult = AggregationByParticipantProcessor.DisplayNameCheckResult.DisplayNamesNotMatching; } } } else { displayNameCheckResult = AggregationByParticipantProcessor.DisplayNameCheckResult.DisplayNamesTooLong; } if (displayNameCheckResult == AggregationByParticipantProcessor.DisplayNameCheckResult.Success && participantsRemoved) { logger.LogSideConversationProcessingData(hashSet2, hashSet); } return(displayNameCheckResult); }
private bool CheckParticipantsGotRemoved(IConversationAggregationLogger logger, ICorePropertyBag deliveredItemPropertyBag, IStorePropertyBag parentItemPropertyBag) { bool result; AggregationByParticipantProcessor.DisplayNameCheckResult displayNameCheckResult = this.TryCheckParticipantsRemovedUsingDisplayNames(logger, deliveredItemPropertyBag, parentItemPropertyBag, out result); if (displayNameCheckResult == AggregationByParticipantProcessor.DisplayNameCheckResult.Success) { logger.LogSideConversationProcessingData(displayNameCheckResult.ToString(), false); return(result); } logger.LogSideConversationProcessingData(displayNameCheckResult.ToString(), true); return(this.CheckParticipantsRemovedUsingParticipants(logger, deliveredItemPropertyBag, parentItemPropertyBag)); }