private static MultiValuedProperty <string> ToStringMVP(MultiValuedProperty <SmtpDomain> domainsMVP)
        {
            MultiValuedProperty <string> multiValuedProperty = new MultiValuedProperty <string>();

            if (domainsMVP != null)
            {
                foreach (SmtpDomain smtpDomain in domainsMVP)
                {
                    multiValuedProperty.Add(smtpDomain.ToString());
                }
            }
            multiValuedProperty.Sort();
            return(multiValuedProperty);
        }
Ejemplo n.º 2
0
        // Token: 0x06005DA3 RID: 23971 RVA: 0x00142FE8 File Offset: 0x001411E8
        private void PopulateTaskPopulatedProperties()
        {
            RelocationConstraintArray relocationConstraintArray = (RelocationConstraintArray)this[OrganizationSchema.PersistedRelocationConstraints];
            MultiValuedProperty <RelocationConstraint> relocationConstraints = new MultiValuedProperty <RelocationConstraint>();

            if (relocationConstraintArray != null && relocationConstraintArray.RelocationConstraints != null)
            {
                Array.ForEach <RelocationConstraint>(relocationConstraintArray.RelocationConstraints, delegate(RelocationConstraint x)
                {
                    relocationConstraints.Add(x);
                });
            }
            if (this.AdminDisplayVersion != null)
            {
                ExchangeBuild exchangeBuild = this.AdminDisplayVersion.ExchangeBuild;
                if (this.AdminDisplayVersion.ExchangeBuild.ToString().StartsWith("14"))
                {
                    relocationConstraints.Add(new RelocationConstraint(RelocationConstraintType.TenantVersionConstraint, DateTime.MaxValue));
                }
            }
            if (this.OrganizationStatus != OrganizationStatus.Active || this.IsUpgradingOrganization || this.IsPilotingOrganization || this.IsUpgradeOperationInProgress || this.IsFfoMigrationInProgress || this.IsUpdatingServicePlan)
            {
                relocationConstraints.Add(new RelocationConstraint(RelocationConstraintType.TenantInTransitionConstraint, DateTime.MaxValue));
            }
            if (!this.IsValid)
            {
                relocationConstraints.Add(new RelocationConstraint(RelocationConstraintType.ValidationErrorConstraint, DateTime.MaxValue));
            }
            if (this.EnableAsSharedConfiguration || this.ImmutableConfiguration)
            {
                relocationConstraints.Add(new RelocationConstraint(RelocationConstraintType.SCTConstraint, DateTime.MaxValue));
            }
            if (this.UpgradeE14MbxCountForCurrentStage != null && this.UpgradeE14MbxCountForCurrentStage.Value != 0)
            {
                relocationConstraints.Add(new RelocationConstraint(RelocationConstraintType.E14MailboxesPresentContraint, DateTime.MaxValue));
            }
            if (!string.IsNullOrEmpty((string)this[ExchangeConfigurationUnitSchema.TargetForest]) || !string.IsNullOrEmpty((string)this[ExchangeConfigurationUnitSchema.RelocationSourceForestRaw]))
            {
                relocationConstraints.Add(new RelocationConstraint(RelocationConstraintType.RelocationInProgressConstraint, DateTime.MaxValue));
            }
            relocationConstraints.Sort();
            this[TenantOrganizationPresentationObjectSchema.RelocationConstraints] = relocationConstraints;
            if (this.IsTemplateTenant)
            {
                this.IsSharingConfiguration = true;
            }
        }
Ejemplo n.º 3
0
        internal static object ELCMessageClassGetter(IPropertyBag propertyBag)
        {
            string text = (string)propertyBag[ElcContentSettingsSchema.MessageClassString];

            if (ElcMessageClass.IsMultiMessageClassDeputy(text))
            {
                StringBuilder stringBuilder = new StringBuilder(128);
                MultiValuedProperty <string> multiValuedProperty = (MultiValuedProperty <string>)propertyBag[ElcContentSettingsSchema.MessageClassArray];
                multiValuedProperty.Sort();
                foreach (string value in multiValuedProperty)
                {
                    stringBuilder.Append(value);
                    stringBuilder.Append(ElcMessageClass.MessageClassDelims[0]);
                }
                stringBuilder.Length--;
                text = stringBuilder.ToString();
            }
            return(text);
        }
        internal static object GetTransitionCounter(IPropertyBag propertyBag)
        {
            object obj = propertyBag[TenantRelocationRequestSchema.TransitionCounterRaw];

            if (obj == null)
            {
                return(null);
            }
            MultiValuedProperty <int>             multiValuedProperty  = (MultiValuedProperty <int>)obj;
            MultiValuedProperty <TransitionCount> multiValuedProperty2 = new MultiValuedProperty <TransitionCount>();

            for (int i = 0; i < multiValuedProperty.Count; i++)
            {
                int num = multiValuedProperty[i];
                TenantRelocationTransition transition = (TenantRelocationTransition)((num & TenantRelocationRequest.TransitionCounterTypeBitmask) >> 16);
                ushort count = (ushort)(num & TenantRelocationRequest.TransitionCounterCountBitmask);
                multiValuedProperty2.Add(new TransitionCount(transition, count));
            }
            multiValuedProperty2.Sort();
            return(multiValuedProperty2);
        }