private void InvokeCodeBasedMethod(string method, params object[] args) { var codeGetter = new CodeGetter(); var oCode = this.ExecRawJson(method, codeGetter, args); var code = codeGetter.GetCode(oCode); if (code == AgileCode.Success) { return; } throw new ApiException(code, HttpCode.Ok, string.Format("Failed sending {0} {1}", method, args)); }
/// <summary> /// expires the given token /// </summary /// <param name="token">authentication token</param> public void Logout(string token) { try { var argMaker = new RawTokenArgMaker(token); var codeGetter = new CodeGetter(); this.rpcRetry.Invoke("logout", argMaker, codeGetter); } catch (ApiException) { throw; } catch (Exception ex) { throw new UnknownApiException(string.Format("logout failed with token={0}", token), ex); } }