IWsCommonSyncToken Method |
Namespace: Aruba.Cloud.WsCommon
[OperationContractAttribute] WsResult<bool> SyncToken( string otpValue1, string otpValue2 )
/// IWsCommon.SyncToken Method (c# .NET) public static string SyncToken(WsCommonClient client, String optValue1, String optValue2) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method SyncToken // obtaining a WsResultOfboolean item WsResultOfboolean result = client.SyncToken(optValue1, optValue2); // if the call is Success print returned values if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server bool value = result.Value; stringBuilder.Append("\nReturned value: "); stringBuilder.Append(value); } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }