protected override bool ExtractToAndCC(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <string> .ParticipantConverter converter, IEqualityComparer <string> comparer, out IDictionary <RecipientItemType, HashSet <string> > recipientTable) { recipientTable = ComplexParticipantExtractorBase <string> .InstantiateResultType(comparer); IList <string> other; if (!Participant.TryGetParticipantsFromDisplayNameProperty(propertyBag, InternalSchema.DisplayToInternal, out other)) { return(false); } IList <string> other2; if (!Participant.TryGetParticipantsFromDisplayNameProperty(propertyBag, InternalSchema.DisplayCcInternal, out other2)) { return(false); } recipientTable[RecipientItemType.To].UnionWith(other); recipientTable[RecipientItemType.Cc].UnionWith(other2); return(true); }
protected override bool ExtractToAndCC(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <T> .ParticipantConverter converter, IEqualityComparer <T> comparer, out IDictionary <RecipientItemType, HashSet <T> > recipientTable) { ICoreItem coreItem = propertyBag.Context.CoreObject as ICoreItem; recipientTable = null; if (coreItem != null) { CoreRecipientCollection recipientCollection = coreItem.GetRecipientCollection(true); if (recipientCollection != null) { recipientTable = ComplexParticipantExtractorBase <T> .InstantiateResultType(comparer); foreach (CoreRecipient coreRecipient in recipientCollection) { if (coreRecipient.RecipientItemType == RecipientItemType.To || coreRecipient.RecipientItemType == RecipientItemType.Cc) { recipientTable[coreRecipient.RecipientItemType].Add(converter(coreRecipient.Participant)); } } return(true); } } return(false); }
protected override bool ExtractReplyTo(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <T> .ParticipantConverter converter, out IList <T> replyToRecipients) { ReplyTo first = new ReplyTo((PropertyBag)propertyBag); replyToRecipients = new List <T>(from participant in first select converter(participant)); return(true); }
protected override bool ExtractReplyTo(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <string> .ParticipantConverter converter, out IList <string> replyToRecipients) { return(Participant.TryGetParticipantsFromDisplayNameProperty(propertyBag, ComplexParticipantExtractorFromPropertyBag.ReplyToNamesPropertyDefinition, out replyToRecipients)); }
protected abstract bool ExtractToAndCC(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <T> .ParticipantConverter converter, IEqualityComparer <T> comparer, out IDictionary <RecipientItemType, HashSet <T> > recipientTable);
protected abstract bool ExtractReplyTo(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <T> .ParticipantConverter converter, out IList <T> replyToRecipients);
public bool Extract(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <T> .ParticipantConverter converter, IEqualityComparer <T> comparer, out IDictionary <RecipientItemType, HashSet <T> > recipientTable) { return(this.ExtractToAndCC(propertyBag, converter, comparer, out recipientTable)); }
public bool Extract(PropertyBag.BasicPropertyStore propertyBag, ComplexParticipantExtractorBase <T> .ParticipantConverter converter, IEqualityComparer <T> comparer, out IDictionary <RecipientItemType, HashSet <T> > recipientTable, out IList <T> replyToRecipients) { replyToRecipients = null; recipientTable = null; return(this.ExtractToAndCC(propertyBag, converter, comparer, out recipientTable) && (!this.CanExtractReplyTo(propertyBag) || this.ExtractReplyTo(propertyBag, converter, out replyToRecipients))); }
private static bool CanExtractRecipients(PropertyBag.BasicPropertyStore propertyBag) { string itemClass = propertyBag.GetValue(InternalSchema.ItemClass) as string; return(ComplexParticipantExtractorBase <T> .CanExtractRecipients(itemClass)); }
public static bool CanExtractRecipients(ICorePropertyBag propertyBag) { string itemClass = propertyBag.TryGetProperty(InternalSchema.ItemClass) as string; return(ComplexParticipantExtractorBase <T> .CanExtractRecipients(itemClass)); }
public virtual bool ShouldExtract(PropertyBag.BasicPropertyStore propertyBag) { return(ComplexParticipantExtractorBase <T> .CanExtractRecipients(propertyBag)); }