SetAutoEjectTimeout Method
SetAutoEjectTimeout(Int32)
Sets the CCID auto-eject timeout (in seconds).
public void SetAutoEjectTimeout(int seconds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | seconds | The length of the timeout in seconds. The value must be in the range System.UInt16.MinValue through System.UInt16.MaxValue. |
Implements
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The value of |
System.InvalidOperationException | The command failed to complete. |
System.NotSupportedException | An error occurred when attempting to connect to the device. |
Remarks
YubiKeys prior to firmware version 5 must use SetLegacyDeviceConfiguration(YubiKeyCapabilities, Byte, Boolean, Int32).
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.