Function CredentialHandle.tryParse

Restore a handle previously returned by serialize().

static bool tryParse(
  string text,
  out CredentialHandle handle
) pure nothrow @nogc @safe;

Parameters

NameDescription
text Value read from application settings.
handle Receives the restored handle.

Returns

true when text is a valid handle representation; false otherwise.

Examples

CredentialHandle handle;

if (!CredentialHandle.tryParse(settings.tokenHandle, handle))
{
    // Ignore the saved value and ask the user to sign in again.
}