TryConnect Method
TryConnect(YubiKeyApplication, out IYubiKeyConnection)
Attempt to connect to the YubiKey device.
C#
bool TryConnect(YubiKeyApplication application, out IYubiKeyConnection connection)
Parameters
Type | Name | Description |
---|---|---|
YubiKeyApplication | application | The application to reference on the device. |
IYubiKeyConnection | connection | Out parameter containing the IYubiKeyConnection instance. |
Returns
System.Boolean
Boolean indicating whether the call was successful.
TryConnect(Byte[], out IYubiKeyConnection)
Attempt to connect to the YubiKey device.
C#
bool TryConnect(byte[] applicationId, out IYubiKeyConnection connection)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | applicationId | A byte array representing the smart card Application ID (AID) for the application to open. |
IYubiKeyConnection | connection | Out parameter containing the IYubiKeyConnection instance. |
Returns
System.Boolean
Boolean indicating whether the call was successful.