示例#1
0
        protected override void InternalProcessRecord()
        {
            LazilyInitialized <SharedTenantConfigurationState> currentOrgState = this.CurrentOrgState;
            OrganizationId currentOrganizationId = base.CurrentOrganizationId;
            TDataObject    dataObject            = base.DataObject;

            if (!currentOrganizationId.Equals(dataObject.OrganizationId))
            {
                currentOrgState = new LazilyInitialized <SharedTenantConfigurationState>(delegate()
                {
                    TDataObject dataObject3 = base.DataObject;
                    return(SharedConfiguration.GetSharedConfigurationState(dataObject3.OrganizationId));
                });
            }
            if (SharedConfigurationTaskHelper.ShouldPrompt(this, this.SharedTenantConfigurationMode, currentOrgState) && !base.InternalForce)
            {
                TDataObject dataObject2 = base.DataObject;
                if (!base.ShouldContinue(Strings.ConfirmSharedConfiguration(dataObject2.OrganizationId.OrganizationalUnit.Name)))
                {
                    TaskLogger.LogExit();
                    return;
                }
            }
            base.InternalProcessRecord();
        }
 protected override void InternalValidate()
 {
     if (!this.IgnoreDehydratedFlag)
     {
         SharedConfigurationTaskHelper.Validate(this, this.SharedTenantConfigurationMode, base.CurrentOrgState, typeof(TDataObject).ToString());
     }
     base.InternalValidate();
 }
示例#3
0
        protected override void InternalValidate()
        {
            SharedTenantConfigurationMode sharedTenantConfigurationMode        = this.SharedTenantConfigurationMode;
            LazilyInitialized <SharedTenantConfigurationState> currentOrgState = this.CurrentOrgState;
            TIdentity identity = this.Identity;

            SharedConfigurationTaskHelper.Validate(this, sharedTenantConfigurationMode, currentOrgState, identity.ToString());
            base.InternalValidate();
        }
示例#4
0
        // Token: 0x060005CE RID: 1486 RVA: 0x0001636C File Offset: 0x0001456C
        protected override IConfigurable ResolveDataObject()
        {
            SharedConfigurationTaskHelper.Validate(this, this.SharedTenantConfigurationMode, this.CurrentOrgState, null);
            ADObject adobject = (ADObject)base.ResolveDataObject();

            if (TaskHelper.ShouldUnderscopeDataSessionToOrganization((IDirectorySession)base.DataSession, adobject))
            {
                base.UnderscopeDataSession(adobject.OrganizationId);
            }
            return(adobject);
        }
示例#5
0
        // Token: 0x060005BE RID: 1470 RVA: 0x00015A84 File Offset: 0x00013C84
        protected override IConfigurable ResolveDataObject()
        {
            SharedConfigurationTaskHelper.Validate(this, this.SharedTenantConfigurationMode, this.CurrentOrgState, null);
            ADObject adobject = (ADObject)RecipientTaskHelper.ResolveDataObject <TDataObject>(base.DataSession, base.TenantGlobalCatalogSession, base.ServerSettings, this.Identity, this.RootId, base.OptionalIdentityData, base.DomainController, new DataAccessHelper.CategorizedGetDataObjectDelegate(base.GetDataObject <TDataObject>), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError));

            if (TaskHelper.ShouldUnderscopeDataSessionToOrganization((IDirectorySession)base.DataSession, adobject))
            {
                base.UnderscopeDataSession(adobject.OrganizationId);
                base.CurrentOrganizationId = adobject.OrganizationId;
            }
            return(adobject);
        }
 // Token: 0x060004B3 RID: 1203 RVA: 0x000111B0 File Offset: 0x0000F3B0
 protected override void InternalProcessRecord()
 {
     if (!this.IgnoreDehydratedFlag && SharedConfigurationTaskHelper.ShouldPrompt(this, this.SharedTenantConfigurationMode, base.CurrentOrgState) && !base.InternalForce)
     {
         TDataObject dataObject = this.DataObject;
         if (!base.ShouldContinue(Strings.ConfirmSharedConfiguration(dataObject.OrganizationId.OrganizationalUnit.Name)))
         {
             return;
         }
     }
     base.InternalProcessRecord();
 }
示例#7
0
        // Token: 0x060005CC RID: 1484 RVA: 0x0001614C File Offset: 0x0001434C
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            OrganizationId currentOrganizationId = base.CurrentOrganizationId;
            TDataObject    dataObject            = this.DataObject;

            if (!currentOrganizationId.Equals(dataObject.OrganizationId))
            {
                this.CurrentOrgState = new LazilyInitialized <SharedTenantConfigurationState>(delegate()
                {
                    TDataObject dataObject8 = this.DataObject;
                    return(SharedConfiguration.GetSharedConfigurationState(dataObject8.OrganizationId));
                });
            }
            if (SharedConfigurationTaskHelper.ShouldPrompt(this, this.SharedTenantConfigurationMode, this.CurrentOrgState) && !base.InternalForce)
            {
                TDataObject dataObject2 = this.DataObject;
                if (!base.ShouldContinue(Strings.ConfirmSharedConfiguration(dataObject2.OrganizationId.OrganizationalUnit.Name)))
                {
                    TaskLogger.LogExit();
                    return;
                }
            }
            TDataObject dataObject3 = this.DataObject;

            if (dataObject3.IsChanged(ADObjectSchema.Id))
            {
                IDirectorySession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(base.DomainController, true, ConsistencyMode.PartiallyConsistent, null, base.OrgWideSessionSettings, ConfigScopes.TenantSubTree, 702, "InternalProcessRecord", "f:\\15.00.1497\\sources\\dev\\Configuration\\src\\ObjectModel\\BaseTasks\\SetAdObjectTask.cs");
                tenantOrTopologyConfigurationSession.UseConfigNC = ((IDirectorySession)base.DataSession).UseConfigNC;
                TDataObject dataObject4 = this.DataObject;
                ADObjectId  parent      = dataObject4.Id.Parent;
                ADRawEntry  adrawEntry  = tenantOrTopologyConfigurationSession.ReadADRawEntry(parent, new PropertyDefinition[]
                {
                    ADObjectSchema.ExchangeVersion,
                    ADObjectSchema.ObjectClass
                });
                ExchangeObjectVersion        exchangeObjectVersion = (ExchangeObjectVersion)adrawEntry[ADObjectSchema.ExchangeVersion];
                MultiValuedProperty <string> multiValuedProperty   = (MultiValuedProperty <string>)adrawEntry[ADObjectSchema.ObjectClass];
                TDataObject dataObject5 = this.DataObject;
                if (dataObject5.ExchangeVersion.IsOlderThan(exchangeObjectVersion) && !multiValuedProperty.Contains(Organization.MostDerivedClass))
                {
                    TDataObject dataObject6 = this.DataObject;
                    string      name        = dataObject6.Name;
                    TDataObject dataObject7 = this.DataObject;
                    base.WriteError(new TaskException(Strings.ErrorParentHasNewerVersion(name, dataObject7.ExchangeVersion.ToString(), exchangeObjectVersion.ToString())), (ErrorCategory)1004, null);
                }
            }
            base.InternalProcessRecord();
            TaskLogger.LogExit();
        }
 internal static void VerifyIsNotTinyTenant(OrganizationId organizationId, Task.ErrorLoggerDelegate writeError)
 {
     if (null == organizationId)
     {
         throw new ArgumentNullException("organizationId");
     }
     if (writeError == null)
     {
         throw new ArgumentNullException("writeError");
     }
     if (SharedConfiguration.GetSharedConfiguration(organizationId) != null)
     {
         SharedConfigurationTaskHelper.WriteTinyTenantError(writeError);
     }
 }
 internal static void VerifyIsNotTinyTenant(LazilyInitialized <SharedTenantConfigurationState> configurationState, Task.ErrorLoggerDelegate writeError)
 {
     if (null == configurationState)
     {
         throw new ArgumentNullException("configurationState");
     }
     if (writeError == null)
     {
         throw new ArgumentNullException("writeError");
     }
     if ((configurationState.Value & SharedTenantConfigurationState.Dehydrated) != SharedTenantConfigurationState.UnSupported)
     {
         SharedConfigurationTaskHelper.WriteTinyTenantError(writeError);
     }
 }
示例#10
0
        // Token: 0x060005C1 RID: 1473 RVA: 0x00015BE0 File Offset: 0x00013DE0
        protected override void InternalValidate()
        {
            SharedTenantConfigurationMode sharedTenantConfigurationMode        = this.SharedTenantConfigurationMode;
            LazilyInitialized <SharedTenantConfigurationState> currentOrgState = this.CurrentOrgState;
            TIdentity identity = this.Identity;

            SharedConfigurationTaskHelper.Validate(this, sharedTenantConfigurationMode, currentOrgState, identity.ToString());
            ADObjectId adobjectId;

            if (this.IgnoreDefaultScope && !RecipientTaskHelper.IsValidDistinguishedName(this.Identity, out adobjectId))
            {
                base.WriteError(new ArgumentException(Strings.ErrorOnlyDNSupportedWithIgnoreDefaultScope), (ErrorCategory)1000, this.Identity);
            }
            base.InternalValidate();
        }
示例#11
0
        // Token: 0x060005CB RID: 1483 RVA: 0x000160D8 File Offset: 0x000142D8
        protected override void InternalValidate()
        {
            SharedTenantConfigurationMode sharedTenantConfigurationMode        = this.SharedTenantConfigurationMode;
            LazilyInitialized <SharedTenantConfigurationState> currentOrgState = this.CurrentOrgState;
            string targetObject;

            if (this.Identity == null)
            {
                targetObject = null;
            }
            else
            {
                TIdentity identity = this.Identity;
                targetObject = identity.ToString();
            }
            SharedConfigurationTaskHelper.Validate(this, sharedTenantConfigurationMode, currentOrgState, targetObject);
            base.InternalValidate();
        }
 protected override void InternalValidate()
 {
     SharedConfigurationTaskHelper.Validate(this, this.SharedTenantConfigurationMode, this.CurrentOrgState, typeof(TDataObject).Name);
     base.InternalValidate();
 }