protected override void PrepareUserObject(ADUser user)
 {
     TaskLogger.LogEnter();
     base.PrepareUserObject(user);
     if (this.WindowsLiveID != null && this.WindowsLiveID.SmtpAddress != SmtpAddress.Empty)
     {
         user.EmailAddressPolicyEnabled = false;
         SmtpProxyAddress item = new SmtpProxyAddress(this.WindowsLiveID.SmtpAddress.ToString(), false);
         if (!user.EmailAddresses.Contains(item))
         {
             user.EmailAddresses.Add(item);
         }
     }
     if (user.ExchangeGuid == SoftDeletedTaskHelper.PredefinedExchangeGuid)
     {
         user.ExchangeGuid = user.PreviousExchangeGuid;
         if (!RecipientTaskHelper.IsExchangeGuidOrArchiveGuidUnique(user, ADMailboxRecipientSchema.ExchangeGuid, user.ExchangeGuid, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError), ExchangeErrorCategory.Client))
         {
             user.ExchangeGuid = Guid.Empty;
         }
         user.PreviousExchangeGuid = Guid.Empty;
     }
     SoftDeletedTaskHelper.UpdateShadowWhenSoftDeletedProperty((IRecipientSession)base.DataSession, this.ConfigurationSession, base.CurrentOrganizationId, this.DataObject);
     this.DataObject.RecipientSoftDeletedStatus = 0;
     this.DataObject.WhenSoftDeleted            = null;
     this.DataObject.InternalOnly = false;
     TaskLogger.LogExit();
 }
 protected override void PrepareRecipientObject(ADUser user)
 {
     TaskLogger.LogEnter();
     base.PrepareRecipientObject(user);
     if (this.WindowsLiveID != null && this.WindowsLiveID.SmtpAddress != SmtpAddress.Empty)
     {
         MailboxTaskHelper.IsLiveIdExists((IRecipientSession)base.DataSession, user.WindowsLiveID, user.NetID, new Task.ErrorLoggerDelegate(base.WriteError));
         user.UserPrincipalName = user.WindowsLiveID.ToString();
     }
     if (!user.IsModified(ADRecipientSchema.DisplayName))
     {
         user.DisplayName = user.Name;
     }
     SoftDeletedTaskHelper.UpdateShadowWhenSoftDeletedProperty((IRecipientSession)base.DataSession, this.ConfigurationSession, base.CurrentOrganizationId, this.DataObject);
     this.DataObject.RecipientSoftDeletedStatus = 0;
     this.DataObject.WhenSoftDeleted            = null;
     this.DataObject.InternalOnly = false;
     this.DataObject.propertyBag.MarkAsChanged(ADRecipientSchema.RecipientSoftDeletedStatus);
     this.DataObject.propertyBag.MarkAsChanged(ADRecipientSchema.WhenSoftDeleted);
     this.DataObject.propertyBag.MarkAsChanged(ADRecipientSchema.TransportSettingFlags);
     TaskLogger.LogExit();
 }