internal static void CheckModerationInMixedEnvironment(ADRecipient recipient, Task.TaskWarningLoggingDelegate warningLogger, LocalizedString warningText)
        {
            if (!recipient.ModerationEnabled || !recipient.IsModified(ADRecipientSchema.ModerationEnabled))
            {
                return;
            }
            ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(false, ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 103, "CheckModerationInMixedEnvironment", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\RecipientTasks\\DistributionList\\DistributionGroupTaskHelper.cs");
            ADPagedReader <MiniServer>    adpagedReader = topologyConfigurationSession.FindPagedMiniServer(null, QueryScope.SubTree, DistributionGroupTaskHelper.filter, null, 1, DistributionGroupTaskHelper.ExchangeVersionProperties);

            using (IEnumerator <MiniServer> enumerator = adpagedReader.GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    MiniServer miniServer = enumerator.Current;
                    warningLogger(warningText);
                }
            }
        }
Exemplo n.º 2
0
        protected override IConfigurable PrepareDataObject()
        {
            TaskLogger.LogEnter();
            IADOrgPerson iadorgPerson = (IADOrgPerson)base.PrepareDataObject();
            ADRecipient  adrecipient  = iadorgPerson as ADRecipient;

            if (!base.Fields.IsModified(OrgPersonPresentationObjectSchema.Manager) && adrecipient.IsModified(ADOrgPersonSchema.Manager) && iadorgPerson.Manager != null)
            {
                this.manager = (ADRecipient)base.GetDataObject <ADRecipient>(new UserContactIdParameter(iadorgPerson.Manager), base.TenantGlobalCatalogSession, null, new LocalizedString?(Strings.ErrorUserOrContactNotFound(iadorgPerson.Manager.ToString())), new LocalizedString?(Strings.ErrorUserOrContactNotUnique(iadorgPerson.Manager.ToString())));
            }
            if (this.CreateDTMFMap)
            {
                iadorgPerson.PopulateDtmfMap(true);
            }
            TaskLogger.LogExit();
            return(adrecipient);
        }