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());
        }
Exemple #2
0
        private static bool OnRestRequestCall(RequestEventArgs request)
        {
            if (RestRequestEvent == null)
            {
                return(false);
            }

            var args = new RestRequestEventArgs
            {
                Request = request,
            };

            RestRequestEvent.Invoke(null, args);
            return(args.Handled);
        }
Exemple #3
0
        private static bool OnRestRequestCall(RequestEventArgs request)
        {
            if (RestRequestEvent == null)
                return false;

            var args = new RestRequestEventArgs
            {
                Request = request,
            };
            RestRequestEvent.Invoke(null, args);
            return args.Handled;
        }