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