예제 #1
0
		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);
			}
		}
예제 #2
0
 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);
 }
예제 #3
0
 public DistributionGroupRow(MailEnabledRecipient distributionGroup) : base(distributionGroup)
 {
     this.Initalize(distributionGroup.RecipientTypeDetails);
 }
예제 #4
0
 public MailboxRecipientRow(MailEnabledRecipient recipient) : base(recipient)
 {
     this.IsRoom = (recipient.RecipientTypeDetails == Microsoft.Exchange.Data.Directory.Recipient.RecipientTypeDetails.RoomMailbox);
 }
예제 #5
0
 public static Identity ToIdentity(this MailEnabledRecipient entry)
 {
     return(entry.Id.ToIdentity(entry.DisplayName));
 }
예제 #6
0
 public GroupRecipientRow(MailEnabledRecipient recipient) : base(recipient)
 {
     this.DistinguishedName = recipient.DistinguishedName;
 }