SetDeviceFlags Method
SetDeviceFlags(DeviceFlags)
Modifies the value of DeviceFlags.
C#
public void SetDeviceFlags(DeviceFlags deviceFlags)
Parameters
Type | Name | Description |
---|---|---|
DeviceFlags | deviceFlags | The desired device settings. A set flag means that the setting is enabled. Otherwise, the capability is disabled. |
Implements
Exceptions
Type | Condition |
---|---|
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 can use SetLegacyDeviceConfiguration(YubiKeyCapabilities, Byte, Boolean, Int32) to enable TouchEject.
This operation requires the YubiKey's configuration to be unlocked (see ConfigurationLocked and UnlockConfiguration(ReadOnlySpan<Byte>).