예제 #1
0
        protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag)
        {
            IDictionary <RecipientItemType, HashSet <string> > recipients = null;

            foreach (ComplexParticipantExtractorBase <string> complexParticipantExtractorBase in ReplyAllDisplayNamesProperty.Extractors)
            {
                if (complexParticipantExtractorBase.ShouldExtract(propertyBag))
                {
                    IList <string> replyTo;
                    object         result;
                    if (complexParticipantExtractorBase.Extract(propertyBag, (Participant participant) => participant.DisplayName, this.ParticipantRepresentationComparer, out recipients, out replyTo))
                    {
                        IParticipant simpleParticipant  = base.GetSimpleParticipant(InternalSchema.Sender, propertyBag);
                        IParticipant simpleParticipant2 = base.GetSimpleParticipant(InternalSchema.From, propertyBag);
                        result = ReplyAllParticipantsRepresentationProperty <string> .BuildReplyAllRecipients <string>((simpleParticipant == null)?null : simpleParticipant.DisplayName, (simpleParticipant2 == null)?null : simpleParticipant2.DisplayName, replyTo, recipients, this.ParticipantRepresentationComparer);
                    }
                    else
                    {
                        result = new PropertyError(this, PropertyErrorCode.GetCalculatedPropertyError);
                    }
                    return(result);
                }
            }
            return(new PropertyError(this, PropertyErrorCode.GetCalculatedPropertyError));
        }
        protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag)
        {
            IDictionary <RecipientItemType, HashSet <IParticipant> > recipients = null;

            if (ReplyAllParticipantsProperty.Extractor.ShouldExtract(propertyBag))
            {
                IList <IParticipant> replyTo;
                if (ReplyAllParticipantsProperty.Extractor.Extract(propertyBag, (Participant participant) => participant, this.ParticipantRepresentationComparer, out recipients, out replyTo))
                {
                    IParticipant simpleParticipant  = base.GetSimpleParticipant(InternalSchema.Sender, propertyBag);
                    IParticipant simpleParticipant2 = base.GetSimpleParticipant(InternalSchema.From, propertyBag);
                    return(ReplyAllParticipantsRepresentationProperty <IParticipant> .BuildReplyAllRecipients <IParticipant>(simpleParticipant, simpleParticipant2, replyTo, recipients, this.ParticipantRepresentationComparer));
                }
            }
            return(ReplyAllParticipantsRepresentationProperty <IParticipant> .InstantiateResultType(this.ParticipantRepresentationComparer));
        }