private void GenerateToken()
{
if (!IsReady)
return;
IsBusy = true;
ErrorMessage = null;
long requestID = ++_requestID;
IdentityManager.Current.GenerateCredentialAsync(Url, UserName, Password, (crd, exc) => TokenGenerated(crd, exc, requestID), GenerateTokenOptions);
}
public void Execute(object parameter) { #if SILVERLIGHT _signInDialog.GenerateToken(); #else if (_signInDialog.AuthenticationType == IdentityManager.AuthenticationType.Token) { _signInDialog.GenerateToken(); } else { _signInDialog.GenerateNetworkCredential(); } #endif }