protected override void UpgradeExchangeVersion(ADObject adObject) { string text = (string)adObject[ADMailboxRecipientSchema.ServerLegacyDN]; if (!string.IsNullOrEmpty(text)) { Server server = base.GlobalConfigSession.FindServerByLegacyDN(text); if (server == null) { base.WriteError(new ManagementObjectNotFoundException(Strings.ErrorServerNotFound(text)), ExchangeErrorCategory.Client, null); } ExchangeObjectVersion exchangeVersion = ExchangeObjectVersion.Exchange2003; if (server.IsE14OrLater) { ADRecipient adrecipient = adObject as ADRecipient; MailEnabledRecipient mailEnabledRecipient = adObject as MailEnabledRecipient; RecipientTypeDetails recipientTypeDetails = (adrecipient != null) ? adrecipient.RecipientTypeDetails : ((mailEnabledRecipient != null) ? mailEnabledRecipient.RecipientTypeDetails : RecipientTypeDetails.None); exchangeVersion = ADUser.GetMaximumSupportedExchangeObjectVersion(recipientTypeDetails, false); } else if (server.IsExchange2007OrLater) { exchangeVersion = ExchangeObjectVersion.Exchange2007; } adObject.SetExchangeVersion(exchangeVersion); } }
public RecipientRow(MailEnabledRecipient recipient) : base(recipient.ToIdentity(), recipient) { this.PrimarySmtpAddress = recipient.PrimarySmtpAddress.ToString(); this.SpriteId = Icons.FromEnum(recipient.RecipientTypeDetails); this.RecipientTypeDetails = recipient.RecipientTypeDetails.ToString(); this.LocRecipientTypeDetails = LocalizedDescriptionAttribute.FromEnum(typeof(RecipientTypeDetails), recipient.RecipientTypeDetails); }
public DistributionGroupRow(MailEnabledRecipient distributionGroup) : base(distributionGroup) { this.Initalize(distributionGroup.RecipientTypeDetails); }
public MailboxRecipientRow(MailEnabledRecipient recipient) : base(recipient) { this.IsRoom = (recipient.RecipientTypeDetails == Microsoft.Exchange.Data.Directory.Recipient.RecipientTypeDetails.RoomMailbox); }
public static Identity ToIdentity(this MailEnabledRecipient entry) { return(entry.Id.ToIdentity(entry.DisplayName)); }
public GroupRecipientRow(MailEnabledRecipient recipient) : base(recipient) { this.DistinguishedName = recipient.DistinguishedName; }