Ejemplo n.º 1
0
        protected override void InternalProcessRecord()
        {
            T    dataObject  = this.DataObject;
            byte major       = dataObject.ExchangeVersion.ExchangeBuild.Major;
            T    dataObject2 = this.DataObject;

            if (major != dataObject2.MaximumSupportedExchangeObjectVersion.ExchangeBuild.Major)
            {
                T dataObject3 = this.DataObject;
                base.WriteError(new CannotModifyCrossVersionObjectException(dataObject3.Id.DistinguishedName), ErrorCategory.InvalidOperation, null);
                return;
            }
            base.InternalProcessRecord();
            T dataObject4 = this.DataObject;

            base.WriteVerbose(Strings.VerboseApplyingAuthenticationSettingForVDir(dataObject4.MetabasePath));
            ExchangeServiceVDirHelper.SetIisVirtualDirectoryAuthenticationMethods(this.DataObject, new Task.TaskErrorLoggingDelegate(base.WriteError), this.MetabaseSetPropertiesFailureMessage);
            T dataObject5 = this.DataObject;

            if (dataObject5.LiveIdBasicAuthentication != null)
            {
                ExchangeServiceVDirHelper.SetLiveIdBasicAuthModule(this.LiveIdBasicAuthentication, false, this.DataObject);
            }
            T dataObject6 = this.DataObject;

            if (dataObject6.OAuthAuthentication != null)
            {
                T dataObject7 = this.DataObject;
                ExchangeServiceVDirHelper.SetOAuthAuthenticationModule(dataObject7.OAuthAuthentication.Value, false, this.DataObject);
            }
            ExchangeServiceVDirHelper.CheckAndUpdateWindowsAuthProvidersIfNecessary(this.DataObject, (bool?)base.Fields["WindowsAuthentication"]);
        }
Ejemplo n.º 2
0
        protected override void InternalProcessComplete()
        {
            ADExchangeServiceVirtualDirectory adexchangeServiceVirtualDirectory = this.DataObject;

            base.InternalProcessComplete();
            ExchangeServiceVDirHelper.SetIisVirtualDirectoryAuthenticationMethods(adexchangeServiceVirtualDirectory, new Task.TaskErrorLoggingDelegate(base.WriteError), this.MetabaseSetPropertiesFailureMessage);
            T dataObject = this.DataObject;

            if (dataObject.LiveIdBasicAuthentication != null)
            {
                T dataObject2 = this.DataObject;
                ExchangeServiceVDirHelper.SetLiveIdBasicAuthModule(dataObject2.LiveIdBasicAuthentication.Value, false, adexchangeServiceVirtualDirectory);
            }
            T dataObject3 = this.DataObject;

            if (dataObject3.OAuthAuthentication != null)
            {
                T dataObject4 = this.DataObject;
                ExchangeServiceVDirHelper.SetOAuthAuthenticationModule(dataObject4.OAuthAuthentication.Value, false, adexchangeServiceVirtualDirectory);
            }
            ExchangeServiceVDirHelper.CheckAndUpdateWindowsAuthProvidersIfNecessary(adexchangeServiceVirtualDirectory, new bool?(true));
        }