@@ -23,26 +23,46 @@ public interface IPlugin
2323 /// <summary>
2424 /// Implement this to handle requests.
2525 /// </summary>
26+ /// <remarks>This is <see langword="null"/> by default, so we can filter plugins based on implementation.</remarks>
2627 Func < RequestArguments , CancellationToken , Task < PluginResponse > > ? OnRequestAsync { get ; }
2728
2829 /// <summary>
2930 /// Implement this to log requests, you cannot modify the request or response here.
3031 /// </summary>
32+ /// <remarks>This is <see langword="null"/> by default, so we can filter plugins based on implementation.</remarks>
3133 Func < RequestArguments , CancellationToken , Task > ? OnRequestLogAsync { get ; }
3234
3335 /// <summary>
3436 /// Implement this to modify responses from the remote server.
3537 /// </summary>
38+ /// <remarks>This is <see langword="null"/> by default, so we can filter plugins based on implementation.</remarks>
3639 Func < ResponseArguments , CancellationToken , Task < PluginResponse ? > > ? OnResponseAsync { get ; }
3740
3841 /// <summary>
39- /// Implement this to modify responses from the remote server.
42+ /// Implement this to log responses from the remote server.
4043 /// </summary>
44+ /// <remarks>Think caching after the fact, combined with <see cref="OnRequestAsync"/>. This is <see langword="null"/> by default, so we can filter plugins based on implementation.</remarks>
4145 Func < ResponseArguments , CancellationToken , Task > ? OnResponseLogAsync { get ; }
46+
4247 Task BeforeRequestAsync ( ProxyRequestArgs e , CancellationToken cancellationToken ) ;
4348 Task BeforeResponseAsync ( ProxyResponseArgs e , CancellationToken cancellationToken ) ;
4449 Task AfterResponseAsync ( ProxyResponseArgs e , CancellationToken cancellationToken ) ;
50+
51+ /// <summary>
52+ /// Receiving RequestLog messages for each <see cref="Microsoft.Extensions.Logging.ILoggerExtensions.LogRequest(Microsoft.Extensions.Logging.ILogger, string, MessageType, HttpRequestMessage)"/> call.
53+ /// </summary>
54+ /// <remarks>This is for collecting log messages not requests itself</remarks>
55+ /// <param name="e"></param>
56+ /// <param name="cancellationToken"></param>
57+ /// <returns></returns>
4558 Task AfterRequestLogAsync ( RequestLogArgs e , CancellationToken cancellationToken ) ;
59+
60+ /// <summary>
61+ /// Executes post-processing tasks after a recording has stopped.
62+ /// </summary>
63+ /// <param name="e">The arguments containing details about the recording that has stopped.</param>
64+ /// <param name="cancellationToken">A token to monitor for cancellation requests.</param>
65+ /// <returns>A task that represents the asynchronous operation.</returns>
4666 Task AfterRecordingStopAsync ( RecordingArgs e , CancellationToken cancellationToken ) ;
4767 Task MockRequestAsync ( EventArgs e , CancellationToken cancellationToken ) ;
4868}
0 commit comments