예제 #1
0
 public ApiInvokedArgs(ApiInvokingArgs invokingArgs, IdentityInfo identity, object result)
 {
     this.invokingArgs = invokingArgs;
     InvokedAt         = DateTime.Now.GetUnixLongTime();
     Identity          = identity;
     Result            = result;
 }
예제 #2
0
 public ApiExceptionArgs(ApiInvokingArgs invokingArgs, IdentityInfo identity, Exception exception)
 {
     this.invokingArgs = invokingArgs;
     InvokedAt         = DateTime.Now.GetUnixLongTime();
     Identity          = identity;
     Exception         = exception;
 }
예제 #3
0
 public static void OnInvoking(ApiInvokingArgs args)
 {
     try
     {
         Invoking?.Invoke(null, args);
     }
     catch (Exception ex)
     {
         throw new ApiInvocationException("Handling Api Invoking event failed.", ex);
     }
 }