Crescendo SDK
Loading...
Searching...
No Matches
CrescendoDLL.TokenManager Class Reference

Continuously monitors every CrescendoDLL.Token the SDK can drive - both Crescendo PC/SC tokens (full applet stack) and generic FIDO authenticators reachable over USB-HID or PC/SC NFC - and emits a single event stream covering hot-plug and card insertion/removal. More...

Static Public Member Functions

static void  StartMonitoring ()
  Starts continuous monitoring. Performs an initial synchronous scan that populates CrescendoDLL.TokenManager.CurrentTokens without firing CrescendoDLL.TokenManager.OnTokensChanged. Subsequent changes fire the event. Idempotent; calling while already monitoring is a no-op.
 
static void  StopMonitoring ()
  Stops monitoring. Idempotent. Safe to call when not monitoring.
 

Properties

static IReadOnlyList< Token CurrentTokens [get]
  Current snapshot. Empty until CrescendoDLL.TokenManager.StartMonitoring has run its initial scan.
 
static DeviceMonitoringStatus  Status [get]
  Aggregate health of the underlying watchers.
 

Events

static ? Action< DeviceMonitoringStatus, string, Exception?>  OnMonitoringStatusChanged
  Fired whenever the underlying watcher status changes. The string carries a short human-readable reason; the exception (if any) is the underlying cause.
 
static ? Action< IReadOnlyList< Token >, IReadOnlyList< TokenChange > >  OnTokensChanged
  Fired after every refresh whose snapshot differs from the previous one. The diff is computed by CrescendoDLL.Token.Id. First arg is the full current snapshot; second arg is the per-token delta vs. the previously published snapshot. Deltas include CrescendoDLL.TokenChangeKind.Updated when the same token stays present but materially changes capabilities or identifying details. The event is not fired for the initial scan performed by CrescendoDLL.TokenManager.StartMonitoring.
 

Detailed Description

Continuously monitors every CrescendoDLL.Token the SDK can drive - both Crescendo PC/SC tokens (full applet stack) and generic FIDO authenticators reachable over USB-HID or PC/SC NFC - and emits a single event stream covering hot-plug and card insertion/removal.

Internally backed by HID hot-plug, PC/SC reader change, and PC/SC card-insert/remove watchers, with a 5-second poll for PC/SC service availability. Aggregate watcher health is reported via CrescendoDLL.TokenManager.OnMonitoringStatusChanged.

Member Function Documentation

◆ StartMonitoring()

◆ StopMonitoring()

Property Documentation

◆ CurrentTokens

◆ Status

Event Documentation

◆ OnMonitoringStatusChanged

◆ OnTokensChanged