private ParticipantSet RetrieveReplyAllData(IDictionary <RecipientItemType, HashSet <IParticipant> > replyAllTable) { ParticipantSet participantSet = new ParticipantSet(); foreach (KeyValuePair <RecipientItemType, HashSet <IParticipant> > keyValuePair in replyAllTable) { participantSet.UnionWith(keyValuePair.Value); } return(participantSet); }
private ParticipantSet GetOrCreateParticipantHash(RecipientItemType type) { ParticipantSet participantSet; if (!this.data.TryGetValue(type, out participantSet)) { participantSet = new ParticipantSet(); this.data.Add(type, participantSet); } return(participantSet); }
public bool IsSubsetOf(ParticipantSet other) { if (this.Count > other.Count) { return(false); } foreach (IParticipant participant in this) { if (!other.Contains(participant)) { return(false); } } return(true); }
public void LogSideConversationProcessingData(ParticipantSet parentReplyAllParticipants, ParticipantSet deliveredReplyAllParticipants) { SchemaBasedLogEvent <ConversationAggregationLogSchema.SideConversationProcessingData> schemaBasedLogEvent = new SchemaBasedLogEvent <ConversationAggregationLogSchema.SideConversationProcessingData>(); if (deliveredReplyAllParticipants.Count > 10) { schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.ParentMessageReplyAllParticipantsCount, parentReplyAllParticipants.Count); schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.DeliveredMessageReplyAllParticipantsCount, deliveredReplyAllParticipants.Count); } else { schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.ParentMessageReplyAllDisplayNames, ExtensibleLogger.FormatPIIValue(this.ConvertParticipantsToLogString(parentReplyAllParticipants))); schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.ParentMessageReplyAllParticipantsCount, parentReplyAllParticipants.Count); schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.DeliveredMessageReplyAllDisplayNames, ExtensibleLogger.FormatPIIValue(this.ConvertParticipantsToLogString(deliveredReplyAllParticipants))); schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.DeliveredMessageReplyAllParticipantsCount, deliveredReplyAllParticipants.Count); } this.LogEvent(schemaBasedLogEvent); }
public void Add(RecipientItemType type, IEnumerable <IParticipant> participants) { ParticipantSet orCreateParticipantHash = this.GetOrCreateParticipantHash(type); orCreateParticipantHash.UnionWith(participants); }