Click or drag to resize

IWsCommonSyncToken Method

Synchronizes the token for the provided username.

Namespace:  Aruba.Cloud.WsCommon
Assembly:  Aruba.Cloud.WsCommon (in Aruba.Cloud.WsCommon.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<bool> SyncToken(
	string otpValue1,
	string otpValue2
)

Parameters

otpValue1
Type: SystemString
otpValue2
Type: SystemString

Return Value

Type: WsResultBoolean
Examples
/// 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();
}
See Also