コード例 #1
0
        protected override void RpcProcessRecord()
        {
            AccountManagerRpcReply reply = RpcClient.AccountManagerUpdateAsync(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)));
            }
        }
コード例 #2
0
        public async Task AccountManagerUpdate()
        {
            // An RpcFailureException will be thrown if not attached to any account manager
            RpcFailureException ex = await Assert.ThrowsExceptionAsync <RpcFailureException>(() => RpcClient.AccountManagerUpdateAsync(CancellationToken.None));

            Assert.AreEqual("bad arg", ex.Message);
        }