예제 #1
0
        public void TestGetAllAlerts()
        {
            using (RpcBroker broker = this.GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioGetAlertsCommand command = new DsioGetAlertsCommand(broker);

                RpcResponse response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
            }
        }
예제 #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);
        }