예제 #1
0
 protected override void InternalValidate()
 {
     TaskLogger.LogEnter();
     base.InternalValidate();
     if (this.FederatedIdentity != null && this.Password != null)
     {
         base.WriteError(new RecipientTaskException(Strings.ErrorFederatedIdentityandPasswordTogether), ExchangeErrorCategory.Client, this.DataObject.Identity);
     }
     if (this.DataObject.IsChanged(MailUserSchema.WindowsLiveID))
     {
         MailboxTaskHelper.IsMemberExists((IRecipientSession)base.DataSession, this.DataObject.WindowsLiveID, new Task.ErrorLoggerDelegate(base.WriteError));
     }
     if (this.DataObject.IsModified(MailUserSchema.UserPrincipalName))
     {
         if (VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).CmdletInfra.ValidateExternalEmailAddressInAcceptedDomain.Enabled&& this.ShouldCheckAcceptedDomains())
         {
             RecipientTaskHelper.ValidateInAcceptedDomain(this.ConfigurationSession, this.DataObject.OrganizationId, RecipientTaskHelper.GetDomainPartOfUserPrincalName(this.DataObject.UserPrincipalName), new Task.ErrorLoggerDelegate(base.WriteError), base.ProvisioningCache);
         }
         RecipientTaskHelper.IsUserPrincipalNameUnique(base.TenantGlobalCatalogSession, this.DataObject, this.DataObject.UserPrincipalName, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError), ExchangeErrorCategory.Client);
     }
     if (this.DataObject.IsChanged(MailboxSchema.JournalArchiveAddress) && this.DataObject.JournalArchiveAddress != SmtpAddress.NullReversePath && this.DataObject.JournalArchiveAddress != SmtpAddress.Empty)
     {
         RecipientTaskHelper.IsJournalArchiveAddressUnique(base.TenantGlobalCatalogSession, this.DataObject.OrganizationId, this.DataObject, this.DataObject.JournalArchiveAddress, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError), ExchangeErrorCategory.Client);
     }
     if (this.DataObject.IsModified(MailUserSchema.SamAccountName))
     {
         RecipientTaskHelper.IsSamAccountNameUnique(this.DataObject, this.DataObject.SamAccountName, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError), ExchangeErrorCategory.Client);
     }
     TaskLogger.LogExit();
 }