File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ using RestSharp ;
2+ using System ;
3+
4+ namespace Ory . Client . Client
5+ {
6+ public partial class ApiClient : ISynchronousClient , IAsynchronousClient
7+ {
8+ /// <summary>
9+ /// Hook to access the underlying RestRequest before the request is sent.
10+ /// </summary>
11+ public Action < RestRequest > ? RequestHook { get ; set ; }
12+
13+ /// <summary>
14+ /// Hook to access the underlying RestRequest and RestResponse after the response is received.
15+ /// </summary>
16+ public Action < RestRequest , RestResponse > ? ResponseHook { get ; set ; }
17+
18+ partial void InterceptRequest ( RestRequest request )
19+ {
20+ RequestHook ? . Invoke ( request ) ;
21+ }
22+
23+ partial void InterceptResponse ( RestRequest request , RestResponse response )
24+ {
25+ ResponseHook ? . Invoke ( request , response ) ;
26+ }
27+ }
28+ }
Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ dotnet () {
227227 --git-host github.com \
228228 -c ./config/client/dotnet.yml.proc.yml
229229 cp " LICENSE" " clients/${PROJECT} /dotnet"
230+ cp " contrib/dotnet/ApiClientHooks.cs" " clients/${PROJECT} /dotnet/src/Ory.Client/Client"
230231}
231232
232233dart () {
You can’t perform that action at this time.
0 commit comments