SetAutoEjectTimeout Method
SetAutoEjectTimeout(int)
Sets the CCID auto-eject timeout (in seconds).
void SetAutoEjectTimeout(int seconds)
Parameters
Type | Name | Description |
---|---|---|
int | seconds | The length of the timeout in seconds. The value must be in the range ushort.MinValue through ushort.MaxValue. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | The value of |
InvalidOperationException | The command failed to complete. |
NotSupportedException | An error occurred when attempting to connect to the device. |
Remarks
YubiKeys prior to firmware version 5 must use SetLegacyDeviceConfiguration(YubiKeyCapabilities, byte, bool, int).
Modifies the value of AutoEjectTimeout. This requires the YubiKey's configuration to be unlocked (see ConfigurationLocked and UnlockConfiguration(ReadOnlySpan<byte>).
A value of 0
means that the timeout is disabled (the smart card
will not be ejected automatically). See TouchEject
for more information on setting up the smart card to automatically eject.