@@ -35,61 +35,61 @@ internal async Task<Intercept> AddInterceptAsync(IEnumerable<InterceptPhase> pha
35
35
return result . Intercept ;
36
36
}
37
37
38
- internal async Task RemoveInterceptAsync ( Intercept intercept , RemoveInterceptOptions ? options = null )
38
+ internal async Task < EmptyResult > RemoveInterceptAsync ( Intercept intercept , RemoveInterceptOptions ? options = null )
39
39
{
40
40
var @params = new RemoveInterceptCommandParameters ( intercept ) ;
41
41
42
- await Broker . ExecuteCommandAsync ( new RemoveInterceptCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
42
+ return await Broker . ExecuteCommandAsync < RemoveInterceptCommand , EmptyResult > ( new RemoveInterceptCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
43
43
}
44
44
45
- public async Task SetCacheBehaviorAsync ( CacheBehavior behavior , SetCacheBehaviorOptions ? options = null )
45
+ public async Task < EmptyResult > SetCacheBehaviorAsync ( CacheBehavior behavior , SetCacheBehaviorOptions ? options = null )
46
46
{
47
47
var @params = new SetCacheBehaviorCommandParameters ( behavior , options ? . Contexts ) ;
48
48
49
- await Broker . ExecuteCommandAsync ( new SetCacheBehaviorCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
49
+ return await Broker . ExecuteCommandAsync < SetCacheBehaviorCommand , EmptyResult > ( new SetCacheBehaviorCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
50
50
}
51
51
52
- internal async Task ContinueRequestAsync ( Request request , ContinueRequestOptions ? options = null )
52
+ internal async Task < EmptyResult > ContinueRequestAsync ( Request request , ContinueRequestOptions ? options = null )
53
53
{
54
54
var @params = new ContinueRequestCommandParameters ( request , options ? . Body , options ? . Cookies , options ? . Headers , options ? . Method , options ? . Url ) ;
55
55
56
- await Broker . ExecuteCommandAsync ( new ContinueRequestCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
56
+ return await Broker . ExecuteCommandAsync < ContinueRequestCommand , EmptyResult > ( new ContinueRequestCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
57
57
}
58
58
59
- internal async Task ContinueResponseAsync ( Request request , ContinueResponseOptions ? options = null )
59
+ internal async Task < EmptyResult > ContinueResponseAsync ( Request request , ContinueResponseOptions ? options = null )
60
60
{
61
61
var @params = new ContinueResponseCommandParameters ( request , options ? . Cookies , options ? . Credentials , options ? . Headers , options ? . ReasonPhrase , options ? . StatusCode ) ;
62
62
63
- await Broker . ExecuteCommandAsync ( new ContinueResponseCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
63
+ return await Broker . ExecuteCommandAsync < ContinueResponseCommand , EmptyResult > ( new ContinueResponseCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
64
64
}
65
65
66
- internal async Task FailRequestAsync ( Request request , FailRequestOptions ? options = null )
66
+ internal async Task < EmptyResult > FailRequestAsync ( Request request , FailRequestOptions ? options = null )
67
67
{
68
68
var @params = new FailRequestCommandParameters ( request ) ;
69
69
70
- await Broker . ExecuteCommandAsync ( new FailRequestCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
70
+ return await Broker . ExecuteCommandAsync < FailRequestCommand , EmptyResult > ( new FailRequestCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
71
71
}
72
72
73
- internal async Task ProvideResponseAsync ( Request request , ProvideResponseOptions ? options = null )
73
+ internal async Task < EmptyResult > ProvideResponseAsync ( Request request , ProvideResponseOptions ? options = null )
74
74
{
75
75
var @params = new ProvideResponseCommandParameters ( request , options ? . Body , options ? . Cookies , options ? . Headers , options ? . ReasonPhrase , options ? . StatusCode ) ;
76
76
77
- await Broker . ExecuteCommandAsync ( new ProvideResponseCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
77
+ return await Broker . ExecuteCommandAsync < ProvideResponseCommand , EmptyResult > ( new ProvideResponseCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
78
78
}
79
79
80
- internal async Task ContinueWithAuthAsync ( Request request , AuthCredentials credentials , ContinueWithAuthCredentialsOptions ? options = null )
80
+ internal async Task < EmptyResult > ContinueWithAuthAsync ( Request request , AuthCredentials credentials , ContinueWithAuthCredentialsOptions ? options = null )
81
81
{
82
- await Broker . ExecuteCommandAsync ( new ContinueWithAuthCommand ( new ContinueWithAuthCredentials ( request , credentials ) ) , options ) . ConfigureAwait ( false ) ;
82
+ return await Broker . ExecuteCommandAsync < ContinueWithAuthCommand , EmptyResult > ( new ContinueWithAuthCommand ( new ContinueWithAuthCredentials ( request , credentials ) ) , options ) . ConfigureAwait ( false ) ;
83
83
}
84
84
85
- internal async Task ContinueWithAuthAsync ( Request request , ContinueWithAuthDefaultCredentialsOptions ? options = null )
85
+ internal async Task < EmptyResult > ContinueWithAuthAsync ( Request request , ContinueWithAuthDefaultCredentialsOptions ? options = null )
86
86
{
87
- await Broker . ExecuteCommandAsync ( new ContinueWithAuthCommand ( new ContinueWithAuthDefaultCredentials ( request ) ) , options ) . ConfigureAwait ( false ) ;
87
+ return await Broker . ExecuteCommandAsync < ContinueWithAuthCommand , EmptyResult > ( new ContinueWithAuthCommand ( new ContinueWithAuthDefaultCredentials ( request ) ) , options ) . ConfigureAwait ( false ) ;
88
88
}
89
89
90
- internal async Task ContinueWithAuthAsync ( Request request , ContinueWithAuthCancelCredentialsOptions ? options = null )
90
+ internal async Task < EmptyResult > ContinueWithAuthAsync ( Request request , ContinueWithAuthCancelCredentialsOptions ? options = null )
91
91
{
92
- await Broker . ExecuteCommandAsync ( new ContinueWithAuthCommand ( new ContinueWithAuthCancelCredentials ( request ) ) , options ) . ConfigureAwait ( false ) ;
92
+ return await Broker . ExecuteCommandAsync < ContinueWithAuthCommand , EmptyResult > ( new ContinueWithAuthCommand ( new ContinueWithAuthCancelCredentials ( request ) ) , options ) . ConfigureAwait ( false ) ;
93
93
}
94
94
95
95
public async Task < Subscription > OnBeforeRequestSentAsync ( Func < BeforeRequestSentEventArgs , Task > handler , SubscriptionOptions ? options = null )
0 commit comments