HID OMNIKEY Smart Card Readers' Sample Codes  0.0.0.116
HidGlobal.OK.Readers.ContextHandler Class Reference

Object to manage an application context for PC/SC resource manager. More...

Inheritance diagram for HidGlobal.OK.Readers.ContextHandler:
HidGlobal.OK.Readers.IContextHandler

Public Member Functions

void Establish (Scope scope)
 Establish context handle for winscard resource manager. More...
 
void Release ()
 Release context handle established by M:HidGlobal.OK.Readers.ContextHandler.Establish(HidGlobal.OK.Readers.Components.Scope). More...
 
void ReEstablish ()
 Establish context handle withT:HidGlobal.OK.Readers.Components.Scope used in previous call ofM:HidGlobal.OK.Readers.ContextHandler.Establish(HidGlobal.OK.Readers.Components.Scope). More...
 
bool IsValid ()
 Check if curently held context handle is valid. More...
 
IReadOnlyList< string > ListReaders (IReadOnlyList< string > readerGroups)
 Lists readers within given reader groups. More...
 
IReadOnlyList< string > ListReaders ()
 List all available readers. More...
 
IReadOnlyList< string > ListReaderGroups ()
 List reader groups existing in the system. More...
 
void IntroduceReaderGroup (string groupName)
 Introduce new reader group to the smart card resource manager. More...
 
void ForgetReaderGroup (string groupName)
 Deletes reader group from smart card resource manager. More...
 
void AddReaderToGroup (string readerName, string groupName)
 Add specified reader to the reader group. Group need to be introduced by M:HidGlobal.OK.Readers.ContextHandler.IntroduceReaderGroup(System.String) beforehand. More...
 
void RemoveReaderFromGroup (string readerName, string groupName)
 Removes reader form the group. More...
 
void Cancel ()
 Cancel blocking request of M:HidGlobal.OK.Readers.ContextHandler.GetStatusChange(System.Int32,HidGlobal.OK.Readers.Components.ReaderState[]@). More...
 
void IntroduceReader (string readerName, string deviceName)
 Introduce additional alias of given device to the smart card resource manager. More...
 
void ForgetReader (string readerName)
 Removes reader from the smart card resource manager. More...
 
IReadOnlyList< ReaderStateGetStatusChange (int timeout, IReadOnlyList< ReaderState > readerStates)
 
IReadOnlyList< ReaderStateGetReaderState (IReadOnlyDictionary< string, ReaderStates > readerNamesWithStatesDictionary)
 
ReaderState GetReaderState (string reader, ReaderStates stateOfTheReader)
 
void Dispose ()
 

Static Public Attributes

static IContextHandler Instance => _instance ?? (_instance = new ContextHandler())
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

System.Text.Encoding Encoding [get, set]
 
IntPtr Handle [get]
 Retrives the context handle. More...
 
- Properties inherited from HidGlobal.OK.Readers.IContextHandler
IntPtr Handle [get]
 Retrives the context handle. More...
 

Detailed Description

Object to manage an application context for PC/SC resource manager.

Member Function Documentation

◆ AddReaderToGroup()

void HidGlobal.OK.Readers.ContextHandler.AddReaderToGroup ( string  readerName,
string  groupName 
)

Add specified reader to the reader group. Group need to be introduced by M:HidGlobal.OK.Readers.ContextHandler.IntroduceReaderGroup(System.String) beforehand.

Add specified reader to the reader group. Group need to be introduced by IntroduceReaderGroup(string) beforehand.

Parameters
readerNameName of the reader.
groupNameName of the group.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ Cancel()

void HidGlobal.OK.Readers.ContextHandler.Cancel ( )

Cancel blocking request of M:HidGlobal.OK.Readers.ContextHandler.GetStatusChange(System.Int32,HidGlobal.OK.Readers.Components.ReaderState[]@).

Cancel blocking request of GetStatusChange(int,ReaderState[]).

Implements HidGlobal.OK.Readers.IContextHandler.

◆ Establish()

void HidGlobal.OK.Readers.ContextHandler.Establish ( Scope  scope)

Establish context handle for winscard resource manager.

Establish context handle for winscard resource manager.

Parameters
scopeDefines for the scope input parameter.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ ForgetReader()

void HidGlobal.OK.Readers.ContextHandler.ForgetReader ( string  readerName)

Removes reader from the smart card resource manager.

Removes reader from the smart card resource manager.

Parameters
readerNameName of the reader.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ ForgetReaderGroup()

void HidGlobal.OK.Readers.ContextHandler.ForgetReaderGroup ( string  groupName)

Deletes reader group from smart card resource manager.

Deletes reader group from smart card resource manager.

Parameters
groupNameName of the reader group.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ GetReaderState() [1/2]

IReadOnlyList<ReaderState> HidGlobal.OK.Readers.ContextHandler.GetReaderState ( IReadOnlyDictionary< string, ReaderStates readerNamesWithStatesDictionary)

Parameters
readerNamesWithStatesDictionary
Returns
T:HidGlobal.OK.Readers.Components.ReaderState

Implements HidGlobal.OK.Readers.IContextHandler.

◆ GetReaderState() [2/2]

ReaderState HidGlobal.OK.Readers.ContextHandler.GetReaderState ( string  reader,
ReaderStates  stateOfTheReader 
)

Parameters
reader
stateOfTheReader
Returns
T:HidGlobal.OK.Readers.Components.ReaderState

Implements HidGlobal.OK.Readers.IContextHandler.

◆ GetStatusChange()

IReadOnlyList<ReaderState> HidGlobal.OK.Readers.ContextHandler.GetStatusChange ( int  timeout,
IReadOnlyList< ReaderState readerStates 
)

Parameters
timeout
readerStates

Implements HidGlobal.OK.Readers.IContextHandler.

◆ IntroduceReader()

void HidGlobal.OK.Readers.ContextHandler.IntroduceReader ( string  readerName,
string  deviceName 
)

Introduce additional alias of given device to the smart card resource manager.

Introduce additional alias of given device to the smart card resource manager.

Parameters
readerNameAdditional name for the device.
deviceNameName of the device.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ IntroduceReaderGroup()

void HidGlobal.OK.Readers.ContextHandler.IntroduceReaderGroup ( string  groupName)

Introduce new reader group to the smart card resource manager.

Introduce new reader group to the smart card resource manager.

Reader group will be created only after additon of first reader to it.

Parameters
groupNameName of the reader group.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ IsValid()

bool HidGlobal.OK.Readers.ContextHandler.IsValid ( )

Check if curently held context handle is valid.

Check if curently held context handle is valid.

Returns
True if context handle is valid, false otherwise.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ ListReaderGroups()

IReadOnlyList<string> HidGlobal.OK.Readers.ContextHandler.ListReaderGroups ( )

List reader groups existing in the system.

List reader groups existing in the system.

Returns
String array with names of available reader groups.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ ListReaders() [1/2]

IReadOnlyList<string> HidGlobal.OK.Readers.ContextHandler.ListReaders ( IReadOnlyList< string >  readerGroups)

Lists readers within given reader groups.

Lists readers within given reader groups.

Parameters
readerGroupsNames of the reader groups
Returns
String array with names of active readers.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ ListReaders() [2/2]

IReadOnlyList<string> HidGlobal.OK.Readers.ContextHandler.ListReaders ( )

List all available readers.

List all available readers.

Returns
String array with names of active readers.

Implements HidGlobal.OK.Readers.IContextHandler.

◆ ReEstablish()

void HidGlobal.OK.Readers.ContextHandler.ReEstablish ( )

Establish context handle withT:HidGlobal.OK.Readers.Components.Scope used in previous call ofM:HidGlobal.OK.Readers.ContextHandler.Establish(HidGlobal.OK.Readers.Components.Scope).

Establish context handle with Scope used in previous call of Establish(Scope).

Implements HidGlobal.OK.Readers.IContextHandler.

◆ Release()

void HidGlobal.OK.Readers.ContextHandler.Release ( )

Release context handle established by M:HidGlobal.OK.Readers.ContextHandler.Establish(HidGlobal.OK.Readers.Components.Scope).

Release context handle established by Establish(Scope).

Implements HidGlobal.OK.Readers.IContextHandler.

◆ RemoveReaderFromGroup()

void HidGlobal.OK.Readers.ContextHandler.RemoveReaderFromGroup ( string  readerName,
string  groupName 
)

Removes reader form the group.

Removes reader form the group.

Parameters
readerNameName of the reader.
groupNameName of the group.

Implements HidGlobal.OK.Readers.IContextHandler.

Property Documentation

◆ Handle

IntPtr HidGlobal.OK.Readers.ContextHandler.Handle
get

Retrives the context handle.


The documentation for this class was generated from the following file: