IWsMonitoringGetMonitoringCheckEvents Method |
Namespace: Aruba.Cloud.WsMonitoring
[OperationContractAttribute] WsResult<List<MonitoringCheckEventsEntity>> GetMonitoringCheckEvents( GetMonitoringCheckEventsEntity getMonitoringCheckEventsEntity )
/// WsMonitoring.GetMonitoringCheckEvents Method (c# .NET) public static string GetMonitoringCheckEvents(WsMonitoringClient client, GetMonitoringCheckEventsEntity getMonitoringCheckEventsEntity) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method GetMonitoringCheckEvents // obtaining a WsResultOfArrayOfMonitoringCheckEventsEntity item WsResultOfArrayOfMonitoringCheckEventsEntity result = client.GetMonitoringCheckEvents(getMonitoringCheckEventsEntity); //if the call is Success print value if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server MonitoringCheckEventsEntity[] items = result.Value; // for each item print the information foreach (MonitoringCheckEventsEntity item in items) { stringBuilder.Append("\nMonitoringCheckID: "); stringBuilder.Append(item.MonitoringCheckID); stringBuilder.Append("\nMonitoringCheckID: "); stringBuilder.Append(item.MonitoringCheckID); } } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }