예제 #1
0
        protected void AspectInvoke(string methodName)
        {
            var method = _getKeyMethod(methodName);

            if (method == null)
            {
                throw new WebException("没有找到页面方法 " + methodName + "的信息");
            }
            AspectAttribute.Invoke(method, this);
        }
예제 #2
0
        public static AspectAttribute[] AspectUnion(object[] obj)
        {
            AspectAttribute[] aAC = new AspectAttribute[obj.Length];

            int i = 0;

            foreach (AspectAttribute aA in obj)
            {
                aAC[i] = aA;
                i++;
            }
            return(aAC);
        }
예제 #3
0
            public void Execute(WebPage page, params object[] args)
            {
                if (this.Config.Device != LoadDevice.Both)
                {
                    if (this.Config.Device == LoadDevice.PC && page.IsMobileDevice)
                    {
                        return;                                                            //仅PC端访问
                    }
                    if (this.Config.Device == LoadDevice.Mobile && !page.IsMobileDevice)
                    {
                        return;                                                                 //仅手机端访问
                    }
                }

                AspectAttribute.Invoke(this.Method, page, args);
            }
 public IAspect[] GetDefaultAspects()
 {
     return(AspectAttribute.GetAspects(XamlPage.Instance.GetType()));
 }