IWsBackupGetSubscribers Method |
Namespace: Aruba.Cloud.WsBackup
[OperationContractAttribute] WsResult<List<Subscribers>> GetSubscribers( int backupAccountID )
/// WsBackupClient.GetSubscribers Method (c# .NET) public static string GetSubscribers(WsBackupClient client,int backupAccountID) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method GetBackupAccount // obtaining a WsResultOfArrayOfSubscribers item WsResultOfArrayOfSubscribers result = client.GetSubscribers(backupAccountID); // if the call is Success print returned values if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server Subscribers[] items = result.Value; if (items != null) { foreach (Subscribers item in items) { stringBuilder.Append("\n Subscriber detail\n"); stringBuilder.Append("\n Type: "); stringBuilder.Append(item.Type); stringBuilder.Append("\n AddressValue: "); stringBuilder.Append(item.AddressValue); } } } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }