コード例 #1
0
ファイル: TestAspect.cs プロジェクト: jpdillingham/aspekt
 public override void OnException(MethodArguments args, Exception e)
 {
     ++Exceptions;
     OnExceptionAction?.Invoke(args, e);
     InspectInstance?.Invoke(Instance);
     Assert.AreEqual(MethodName, args.MethodName, "OnException - MethodNames don't match");
 }
コード例 #2
0
        public override OnExceptionAction OnAddException(Request request, Exception ex)
        {
            OnExceptionAction action = OnExceptionAction.Dismiss;

            if (RequestException != null)
            {
                RequestExceptionEventArgs args = new RequestExceptionEventArgs(request, ex, action);
                RequestException(this, args);
                action = args.OnExceptionAction;
            }
            return(action);
        }
コード例 #3
0
 public RequestExceptionEventArgs(Request request, Exception exception, OnExceptionAction exceptionAction)
 {
     this.request         = request;
     this.exception       = exception;
     this.exceptionAction = exceptionAction;
 }