Show / Hide Table of Contents

SignalUserCancel Property

SignalUserCancel

For some operations, this property is an implementation of a delegate the KeyCollector can call to indicate the user is canceling the operation. If it is null, report cancellation normally, by having the KeyCollector return false. If it is not null, use the supplied delegate to report user cancellation.

C#
public SignalUserCancel? SignalUserCancel { get; }

Property Value

Type Description
SignalUserCancel

Remarks

Currently this is valid only when the Request is either TouchRequest, EnrollFingerprint, or VerifyFido2Uv. For all other requests, this will be null.

The normal way to indicate that a user is canceling an operation is to have the KeyCollector return false. However, for some operations, such as Touch and Fingerprint, the KeyCollector is called on a separate thread and the return is ignored. That is, it is an asynchronous call. The main thread performing the YubiKey operation will not see the KeyCollector's return. Hence, to indicate user cancellation in these cases, this delegate is provided.

Your KeyCollector is called with an instance of this KeyEntryData class. If this property is not null, you can save this delegate. Later on, if the user cancels, you can call the delegate. If the YubiKey has not completed the operation or timed out by the time it receives notification of user cancellation, the SDK can cancel. Note that generally, user cancellation results in an OperationCanceledException.

In this article
Back to top Generated by DocFX