TryConnect Method
TryConnect(YubiKeyApplication, out IYubiKeyConnection)
Attempt to connect to the YubiKey device.
C#
public 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.
Implements
TryConnect(Byte[], out IYubiKeyConnection)
Attempt to connect to the YubiKey device.
C#
public 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.