Example #1
0
        protected virtual void RaiseFingerprintFailedEvent(FingerprintEventArgs e)
        {
            // Make a temporary copy of the event to avoid possibility of
            // a race condition if the last subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            EventHandler <FingerprintEventArgs> handler = OnFingerprintFailed;

            // Event will be null if there are no subscribers
            if (handler != null)
            {
                // Use the () operator to raise the event.
                handler(this, e);
            }
        }
Example #2
0
 public virtual void RaiseOnScanSuccess(FingerprintEventArgs e)
 {
     OnScanSuccess?.Invoke(this, e);
 }