public object Intercept(LinFu.DynamicProxy.InvocationInfo invocation) { var args = invocation.Arguments; if (invocation.TargetMethod.Name == "OnSpecificationEnd") onSpecificationEnd(args[0], args[1]); else if (invocation.TargetMethod.Name == "OnSpecificationStart") onSpecificationStart(args[0]); return null; }
public override object Intercept(LinFu.AOP.Interfaces.IInvocationInfo info) { object ret = info.TargetMethod.Invoke (info.Target, info.Arguments); if (((PopupType)typeof(Popups).GetField ("currentPopupType", BindingFlags.Instance | BindingFlags.NonPublic).GetValue (info.Target)) == PopupType.SAVE_DECK && typeof(Popups).GetField ("popupType", BindingFlags.Instance | BindingFlags.NonPublic).GetValue (info.Target).Equals("login")) { float num2 = Screen.height * 0.03f; Rect rect = new Rect((Screen.width * 0.5f) - (Screen.height * 0.35f), Screen.height * 0.3f, Screen.height * 0.7f, Screen.height * 0.4f); Rect popupInner = new Rect(rect.x + num2, rect.y + num2, rect.width - (2f * num2), rect.height - (2f * num2)); Rect rect9 = new Rect(popupInner.x + (popupInner.width * 0.2f), popupInner.y + (popupInner.height * 0.5f) + popupInner.height * 0.13f, popupInner.width * 0.6f, popupInner.height * 0.14f); this.encryptedPassword = GUI.PasswordField (rect9, this.encryptedPassword, '*'); } return ret; }
public bool AppliesTo(object target, LinFu.DynamicProxy.InvocationInfo info) { if (target as Account == null) return false; if (info.TargetMethod.Name == "Deposit") return true; return false; }
public void ShowError(System.IO.TextWriter output, object target, LinFu.DynamicProxy.InvocationInfo info, object returnValue) { throw new NotImplementedException(); }
public bool Check(object target, LinFu.DynamicProxy.InvocationInfo info, object returnValue) { throw new NotImplementedException(); }
public void BeforeMethodCall(object target, LinFu.DynamicProxy.InvocationInfo info) { }
public bool AppliesTo(object target, LinFu.DynamicProxy.InvocationInfo info) { throw new NotImplementedException(); }
public bool Check(object target, LinFu.DynamicProxy.InvocationInfo info) { LinFuCalculator cc = (LinFuCalculator)target; return true; }
public bool AppliesTo(object target, LinFu.DynamicProxy.InvocationInfo info) { if (info.TargetMethod.Name == "Mult") return true; return false; }
public bool Check(object target, LinFu.DynamicProxy.InvocationInfo info, object returnValue) { Account account = target as Account; return account.Balance == oldBalance + (int)info.Arguments[0]; }
public void BeforeMethodCall(object target, LinFu.DynamicProxy.InvocationInfo info) { oldBalance = (target as Account).Balance; }