public ReturnType InvokeMethod <ReturnType>(string methodName, object[] args) { string response; lock (connectionLock) { SendRequest(JsonRequest.FormInvokationRequest(methodName, args)); response = WaitingForResponse(); } return(JsonResponse.DeserializeResponse <ReturnType>(response)); }