The CardReaderEventProvider is a major unit within BasicCard Library/Framework. Through CardReaderEventProvider client applications can get access to a initialized ICardService object attached to an inserted smart card.

Namespace: BasicCard.Framework
Assembly: BasicCard (in BasicCard.dll) Version: 2.5.2.0 (2.5.2.0)

Syntax

C#
[CLSCompliantAttribute(true)]
public class CardReaderEventProvider : IDisposable
Visual Basic
<CLSCompliantAttribute(true)>
Public Class CardReaderEventProvider
	Implements IDisposable
Visual C++
[CLSCompliantAttribute(true)]
public ref class CardReaderEventProvider : IDisposable
F#
[<CLSCompliantAttribute(true)>]
type CardReaderEventProvider =  
    class
        interface IDisposable
    end

Remarks

The CardReaderEventProvider the event based front end to the framework. First step to use the event provider is to create an instance of CardReaderEventProvider (CardReaderEventProvider(ISynchronizeInvoke)).

Once the event provider object exists you can register for service events (see ServiceEvent). In opposite to events generated by CardReaderObserver, this events can be directly consumed in Windows forms, if a Windows forma object has been used as invokeContext in constructor of that object.

As next step the desired type of card service has to be requested by use of RequestService(Type, Boolean, Object).

Once a card matching desired service class is available, the ServiceEvent is called. Check event arguments if a service is available by inspecting the EventType property. If this is the case mark the service as consumed by setting ServiceConsumed to true and take the service instance (CardService) and use it as desired.

A service means, that as a general rule application developer should implement a ICardService, e.g. by extending AbstractBasicCardService. Then he can apply for a service object as described above.

Inheritance Hierarchy

System..::..Object
  BasicCard.Framework..::..CardReaderEventProvider

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also