public static async Task Execute(TrelloAuthorization auth, Endpoint endpoint, CancellationToken ct, IDictionary <string, object> parameters = null) { var request = BuildRequest(auth, endpoint, parameters); var response = await RestRequestProcessor.AddRequest(request, ct); ValidateResponse(response); }
private static void ProcessRequest <T>(IRestRequest request, object obj) where T : class { RestRequestProcessor.AddRequest <T>(request, obj); lock (obj) Monitor.Wait(obj); ValidateResponse(request); }
private static async Task <IRestResponse <T> > ProcessRequest <T>(IRestRequest request, CancellationToken ct) where T : class { var response = await RestRequestProcessor.AddRequest <T>(request, ct); ValidateResponse(response); return(response as IRestResponse <T>); }
public static void Execute(TrelloAuthorization auth, Endpoint endpoint, IDictionary <string, object> parameters = null) { var obj = new object(); var request = BuildRequest(auth, endpoint, parameters); RestRequestProcessor.AddRequest(request, obj); lock (obj) Monitor.Wait(obj); ValidateResponse(request); }
public static T Execute <T>(TrelloAuthorization auth, Endpoint endpoint, IDictionary <string, object> parameters = null) where T : class { var obj = new object(); var request = BuildRequest(auth, endpoint, parameters); AddDefaultParameters <T>(request); RestRequestProcessor.AddRequest <T>(request, obj); lock (obj) Monitor.Wait(obj); ValidateResponse(request); var response = request.Response as IRestResponse <T>; return(response?.Data); }