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

                DsioGetAlertsCommand command = new DsioGetAlertsCommand(broker);

                command.AddCommandArguments(11, 10);

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
            }
        }
Exemplo n.º 2
0
        public AlertListResult GetAlerts(int page, int itemsPerPage)
        {
            AlertListResult result = new AlertListResult();

            DsioGetAlertsCommand command = new DsioGetAlertsCommand(this.broker);

            command.AddCommandArguments(page, itemsPerPage);

            RpcResponse response = command.Execute();

            result.Success = response.Status == RpcResponseStatus.Success;
            result.Message = response.InformationalMessage;

            if (result.Success)
            {
                result.Alerts       = command.Alerts;
                result.TotalResults = command.TotalResults;
            }
            return(result);
        }