PopActivationAttributes() static private méthode

static private PopActivationAttributes ( Type serverType ) : void
serverType System.Type
Résultat void
        private static bool IsCurrentContextOK(RuntimeType serverType, object[] props, ref ConstructorCallMessage ctorCallMsg)
        {
            object[] objArray1 = ActivationServices.PeekActivationAttributes((Type)serverType);
            if (objArray1 != null)
            {
                ActivationServices.PopActivationAttributes((Type)serverType);
            }
            object[] objArray2 = new object[1] {
                (object)ActivationServices.GetGlobalAttribute()
            };
            object[] objArray3      = (object[])ActivationServices.GetContextAttributesForType((Type)serverType);
            Context  currentContext = Thread.CurrentContext;

            ctorCallMsg           = new ConstructorCallMessage(objArray1, objArray2, objArray3, serverType);
            ctorCallMsg.Activator = (IActivator) new ConstructionLevelActivator();
            bool flag = ActivationServices.QueryAttributesIfContextOK(currentContext, (IConstructionCallMessage)ctorCallMsg, objArray2);

            if (flag)
            {
                flag = ActivationServices.QueryAttributesIfContextOK(currentContext, (IConstructionCallMessage)ctorCallMsg, objArray1);
                if (flag)
                {
                    flag = ActivationServices.QueryAttributesIfContextOK(currentContext, (IConstructionCallMessage)ctorCallMsg, objArray3);
                }
            }
            return(flag);
        }
        private static bool IsCurrentContextOK(RuntimeType serverType, object[] props, ref ConstructorCallMessage ctorCallMsg)
        {
            object[] array = ActivationServices.PeekActivationAttributes(serverType);
            if (array != null)
            {
                ActivationServices.PopActivationAttributes(serverType);
            }
            object[] array2 = new object[]
            {
                ActivationServices.GetGlobalAttribute()
            };
            object[] contextAttributesForType = ActivationServices.GetContextAttributesForType(serverType);
            Context  currentContext           = Thread.CurrentContext;

            ctorCallMsg           = new ConstructorCallMessage(array, array2, contextAttributesForType, serverType);
            ctorCallMsg.Activator = new ConstructionLevelActivator();
            bool flag = ActivationServices.QueryAttributesIfContextOK(currentContext, ctorCallMsg, array2);

            if (flag)
            {
                flag = ActivationServices.QueryAttributesIfContextOK(currentContext, ctorCallMsg, array);
                if (flag)
                {
                    flag = ActivationServices.QueryAttributesIfContextOK(currentContext, ctorCallMsg, contextAttributesForType);
                }
            }
            return(flag);
        }