WaitForSlotEvent() public method

Waits for a slot event, such as token insertion or token removal, to occur
public WaitForSlotEvent ( bool dontBlock, bool &eventOccured, ulong &slotId ) : void
dontBlock bool Flag indicating that method should not block until an event occurs - it should return immediately instead. See PKCS#11 standard for full explanation.
eventOccured bool Flag indicating whether event occured
slotId ulong PKCS#11 handle of slot that the event occurred in
return void
 public void _03_WaitForSlotEventTest()
 {
     using (Pkcs11 pkcs11 = new Pkcs11(Settings.Pkcs11LibraryPath, Settings.UseOsLocking))
     {
         // Wait for a slot event
         bool eventOccured = false;
         ulong slotId = 0;
         pkcs11.WaitForSlotEvent(true, out eventOccured, out slotId);
         Assert.IsFalse(eventOccured);
     }
 }