Exemplo n.º 1
0
        public void TestDeleteItemFromSelectList()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioSelectListCommand command = new DsioSelectListCommand(broker);

                command.AddCommandArguments("R", "Bogus Reason", DsioSelectListCommand.SelectListOperation.Delete);

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);

                broker.Disconnect();
            }
        }
Exemplo n.º 2
0
        public void TestGetSelectList()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioSelectListCommand command = new DsioSelectListCommand(broker);

                command.AddCommandArguments("R");

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);

                broker.Disconnect();
            }
        }
Exemplo n.º 3
0
        public BrokerOperationResult AddAny(string listIdentifier, string addValue)
        {
            BrokerOperationResult returnResult = new BrokerOperationResult();

            if (this.broker != null)
            {
                DsioSelectListCommand command = new DsioSelectListCommand(this.broker);

                command.AddCommandArguments(listIdentifier, addValue, DsioSelectListCommand.SelectListOperation.Add);

                RpcResponse response = command.Execute();

                if (response.Status == RpcResponseStatus.Success)
                {
                    returnResult.Success = true;
                }
            }

            return(returnResult);
        }
Exemplo n.º 4
0
        private SelectListResult GetAnyList(string listIdentifier)
        {
            SelectListResult returnResult = new SelectListResult();

            if (this.broker != null)
            {
                DsioSelectListCommand command = new DsioSelectListCommand(this.broker);

                command.AddCommandArguments(listIdentifier);

                RpcResponse response = command.Execute();

                if (response.Status == RpcResponseStatus.Success)
                {
                    returnResult.Success = true;

                    returnResult.SelectList = command.SelectList;
                }
            }

            return(returnResult);
        }