1818// </copyright>
1919
2020using System ;
21+ using System . Collections . Generic ;
2122using System . Threading . Tasks ;
2223
2324namespace OpenQA . Selenium . BiDi . Network ;
@@ -28,7 +29,7 @@ public async Task<Intercept> InterceptRequestAsync(Func<InterceptedRequest, Task
2829 {
2930 var intercept = await AddInterceptAsync ( [ InterceptPhase . BeforeRequestSent ] , options ) . ConfigureAwait ( false ) ;
3031
31- await intercept . OnBeforeRequestSentAsync ( async req => await handler ( new ( req . BiDi , req . Context , req . IsBlocked , req . Navigation , req . RedirectCount , req . Request , req . Timestamp , req . Initiator ) ) ) . ConfigureAwait ( false ) ;
32+ await intercept . OnBeforeRequestSentAsync ( async req => await handler ( new ( req . BiDi , req . Context , req . IsBlocked , req . Navigation , req . RedirectCount , req . Request , req . Timestamp , req . Initiator , req . Intercepts ) ) ) . ConfigureAwait ( false ) ;
3233
3334 return intercept ;
3435 }
@@ -37,7 +38,7 @@ public async Task<Intercept> InterceptResponseAsync(Func<InterceptedResponse, Ta
3738 {
3839 var intercept = await AddInterceptAsync ( [ InterceptPhase . ResponseStarted ] , options ) . ConfigureAwait ( false ) ;
3940
40- await intercept . OnResponseStartedAsync ( async res => await handler ( new ( res . BiDi , res . Context , res . IsBlocked , res . Navigation , res . RedirectCount , res . Request , res . Timestamp , res . Response ) ) ) . ConfigureAwait ( false ) ;
41+ await intercept . OnResponseStartedAsync ( async res => await handler ( new ( res . BiDi , res . Context , res . IsBlocked , res . Navigation , res . RedirectCount , res . Request , res . Timestamp , res . Response , res . Intercepts ) ) ) . ConfigureAwait ( false ) ;
4142
4243 return intercept ;
4344 }
@@ -46,7 +47,7 @@ public async Task<Intercept> InterceptAuthAsync(Func<InterceptedAuth, Task> hand
4647 {
4748 var intercept = await AddInterceptAsync ( [ InterceptPhase . AuthRequired ] , options ) . ConfigureAwait ( false ) ;
4849
49- await intercept . OnAuthRequiredAsync ( async auth => await handler ( new ( auth . BiDi , auth . Context , auth . IsBlocked , auth . Navigation , auth . RedirectCount , auth . Request , auth . Timestamp , auth . Response ) ) ) . ConfigureAwait ( false ) ;
50+ await intercept . OnAuthRequiredAsync ( async auth => await handler ( new ( auth . BiDi , auth . Context , auth . IsBlocked , auth . Navigation , auth . RedirectCount , auth . Request , auth . Timestamp , auth . Response , auth . Intercepts ) ) ) . ConfigureAwait ( false ) ;
5051
5152 return intercept ;
5253 }
@@ -58,8 +59,8 @@ public sealed class InterceptResponseOptions : AddInterceptOptions;
5859
5960public sealed class InterceptAuthOptions : AddInterceptOptions ;
6061
61- public sealed record InterceptedRequest ( BiDi BiDi , BrowsingContext . BrowsingContext ? Context , bool IsBlocked , BrowsingContext . Navigation ? Navigation , long RedirectCount , RequestData Request , DateTimeOffset Timestamp , Initiator Initiator )
62- : BeforeRequestSentEventArgs ( BiDi , Context , IsBlocked , Navigation , RedirectCount , Request , Timestamp , Initiator )
62+ public sealed record InterceptedRequest ( BiDi BiDi , BrowsingContext . BrowsingContext ? Context , bool IsBlocked , BrowsingContext . Navigation ? Navigation , long RedirectCount , RequestData Request , DateTimeOffset Timestamp , Initiator Initiator , IReadOnlyList < Intercept > ? Intercepts )
63+ : BeforeRequestSentEventArgs ( BiDi , Context , IsBlocked , Navigation , RedirectCount , Request , Timestamp , Initiator , Intercepts )
6364{
6465 public Task ContinueAsync ( ContinueRequestOptions ? options = null )
6566 {
@@ -77,17 +78,17 @@ public Task ProvideResponseAsync(ProvideResponseOptions? options = null)
7778 }
7879}
7980
80- public sealed record InterceptedResponse ( BiDi BiDi , BrowsingContext . BrowsingContext ? Context , bool IsBlocked , BrowsingContext . Navigation ? Navigation , long RedirectCount , RequestData Request , DateTimeOffset Timestamp , ResponseData Response )
81- : ResponseStartedEventArgs ( BiDi , Context , IsBlocked , Navigation , RedirectCount , Request , Timestamp , Response )
81+ public sealed record InterceptedResponse ( BiDi BiDi , BrowsingContext . BrowsingContext ? Context , bool IsBlocked , BrowsingContext . Navigation ? Navigation , long RedirectCount , RequestData Request , DateTimeOffset Timestamp , ResponseData Response , IReadOnlyList < Intercept > ? Intercepts )
82+ : ResponseStartedEventArgs ( BiDi , Context , IsBlocked , Navigation , RedirectCount , Request , Timestamp , Response , Intercepts )
8283{
8384 public Task ContinueAsync ( ContinueResponseOptions ? options = null )
8485 {
8586 return BiDi . Network . ContinueResponseAsync ( Request . Request , options ) ;
8687 }
8788}
8889
89- public sealed record InterceptedAuth ( BiDi BiDi , BrowsingContext . BrowsingContext ? Context , bool IsBlocked , BrowsingContext . Navigation ? Navigation , long RedirectCount , RequestData Request , DateTimeOffset Timestamp , ResponseData Response )
90- : AuthRequiredEventArgs ( BiDi , Context , IsBlocked , Navigation , RedirectCount , Request , Timestamp , Response )
90+ public sealed record InterceptedAuth ( BiDi BiDi , BrowsingContext . BrowsingContext ? Context , bool IsBlocked , BrowsingContext . Navigation ? Navigation , long RedirectCount , RequestData Request , DateTimeOffset Timestamp , ResponseData Response , IReadOnlyList < Intercept > ? Intercepts )
91+ : AuthRequiredEventArgs ( BiDi , Context , IsBlocked , Navigation , RedirectCount , Request , Timestamp , Response , Intercepts )
9192{
9293 public Task ContinueAsync ( AuthCredentials credentials , ContinueWithAuthCredentialsOptions ? options = null )
9394 {
0 commit comments