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.