예제 #1
0
        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);
        }
예제 #2
0
 private static void ProcessRequest <T>(IRestRequest request, object obj) where T : class
 {
     RestRequestProcessor.AddRequest <T>(request, obj);
     lock (obj)
         Monitor.Wait(obj);
     ValidateResponse(request);
 }
예제 #3
0
        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>);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }