Ejemplo n.º 1
0
        public MdbRecipient(IExchangePrincipal principal, CultureInfo culture)
        {
            Util.ThrowOnNullArgument(principal, "principal");
            Participant participant = new Participant(principal);

            this.displayName  = participant.DisplayName;
            this.emailAddress = participant.EmailAddress;
            this.routingType  = participant.RoutingType;
            this.smtpAddress  = participant.GetValueOrDefault <string>(ParticipantSchema.SmtpAddress);
            if (string.IsNullOrEmpty(this.smtpAddress) && this.routingType == "SMTP")
            {
                this.smtpAddress = this.emailAddress;
            }
            this.sipUri               = participant.GetValueOrDefault <string>(ParticipantSchema.SipUri);
            this.alias                = participant.GetValueOrDefault <string>(ParticipantSchema.Alias);
            this.isDistributionList   = MdbRecipient.IsDistributionListParticipant(participant);
            this.recipientDisplayType = participant.GetValueOrDefault <RecipientDisplayType>(ParticipantSchema.DisplayTypeEx);
            this.organizationalId     = principal.MailboxInfo.OrganizationId;
            this.cultureInfo          = culture;
            this.ComputeIdentity();
        }