protected override void RpcProcessRecord()
        {
            AccountManagerRpcReply reply = RpcClient.AccountManagerAttachAsync(Url, UserName, Password, CancellationToken.None).GetAwaiter().GetResult();

            if (reply.ErrorCode != ErrorCode.Success)
            {
                throw new Exception(string.Format("Account manager operation failed. Error code: {0}. Error message: {1}", reply.ErrorCode, string.Join(" ", reply.Messages)));
            }
        }
Exemplo n.º 2
0
        protected override void RpcProcessRecord()
        {
            if (!ShouldProcess(BoincSession.Host))
            {
                return;
            }

            AccountManagerRpcReply reply = RpcClient.AccountManagerAttachAsync(string.Empty, string.Empty, string.Empty, CancellationToken.None).GetAwaiter().GetResult();

            if (reply.ErrorCode != ErrorCode.Success)
            {
                throw new Exception(string.Format("Account manager operation failed. Error code: {0}. Error message: {1}", reply.ErrorCode, string.Join(" ", reply.Messages)));
            }
        }
Exemplo n.º 3
0
        public async Task AccountManagerAttach()
        {
            AccountManagerRpcReply reply = await RpcClient.AccountManagerAttachAsync("http://www.gridrepublic.org/", "invalid_username", "invalid_password", CancellationToken.None);

            Assert.AreEqual(ErrorCode.BadEmailAddr, reply.ErrorCode);
        }