Exemplo n.º 1
0
 public static IClientSettingsBuilder OnRequest(this IClientSettingsBuilder builder,
                                                Action <IRestClient, IRestRequest> handler)
 {
     return(builder.OnRequest((client, request) => {
         handler(client, request);
         return Task.CompletedTask;
     }));
 }
Exemplo n.º 2
0
 public static IClientSettingsBuilder OnRequest(this IClientSettingsBuilder builder, Func <IRestClient, IRestRequest, Task> handler)
 {
     return(builder.OnRequest(new DelegatedRequestHandler(handler)));
 }
Exemplo n.º 3
0
 public static IClientSettingsBuilder OnRequest <T>(this IClientSettingsBuilder builder)
     where T : class, IRequestHandler
 {
     return(builder.OnRequest(typeof(T)));
 }
Exemplo n.º 4
0
 public static IClientSettingsBuilder OnRequest(this IClientSettingsBuilder builder, Action <IRestRequest> handler)
 {
     return(builder.OnRequest((client, request) => handler(request)));
 }