protected void AspectInvoke(string methodName) { var method = _getKeyMethod(methodName); if (method == null) { throw new WebException("没有找到页面方法 " + methodName + "的信息"); } AspectAttribute.Invoke(method, this); }
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); }
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())); }