private void Auphonic_SendRequest(object sender, RestRequestEventArgs e) { var sb = new StringBuilder() .AppendLine($"Method: {e.Request.Method}") .AppendLine($"Resource: {e.Request.Resource}") .AppendLine($"Parameters: {String.Join(Environment.NewLine, e.Request.Parameters)}") .AppendLine("----------------------------------------------------------------------------------------------------"); File.AppendAllText(_logFilePath, sb.ToString()); }
private static bool OnRestRequestCall(RequestEventArgs request) { if (RestRequestEvent == null) { return(false); } var args = new RestRequestEventArgs { Request = request, }; RestRequestEvent.Invoke(null, args); return(args.Handled); }
private static bool OnRestRequestCall(RequestEventArgs request) { if (RestRequestEvent == null) return false; var args = new RestRequestEventArgs { Request = request, }; RestRequestEvent.Invoke(null, args); return args.Handled; }