DirectOutput
DirectOutput framework R3 for virtual pinball cabinets.
Loading...
Searching...
No Matches
DirectOutput.General.ThreadInfoList Class Reference

List of ThreadInfo objects.
This class is used by DOF for thread monitoring. More...

Inheritance diagram for DirectOutput.General.ThreadInfoList:
Collaboration diagram for DirectOutput.General.ThreadInfoList:

Public Member Functions

void HeartBeat (object HostObject=null)
 Calls the HeartBeat method of the ThreadInfo object for the specified thread.
If the specified thread does not have a ThreadInfo object in the list, a new ThreadInfo object will be instanciated and added to the list.
void HeartBeat (string HostObjectName)
 Calls the HeartBeat method of the ThreadInfo object for the specified thread.
If the specified thread does not have a ThreadInfo object in the list, a new ThreadInfo object will be instanciated and added to the list.
void RecordException (Exception Exception, object HostObject=null)
 This method records a exception which has been captured.
void ThreadTerminates ()
 Has to be called by the thread before it terminates.
This command removes the thread from the List, so the system can clean up the resources used by the thread.
bool Contains (Thread Thread)
 Determines whether the list contains a ThreadInfo object for the given thread.

Properties

ThreadInfo this[Thread Thread] [get]
 Gets the ThreadInfo object for the specified thread.

Detailed Description

List of ThreadInfo objects.
This class is used by DOF for thread monitoring.

Member Function Documentation

◆ Contains()

bool DirectOutput.General.ThreadInfoList.Contains ( Thread Thread)

Determines whether the list contains a ThreadInfo object for the given thread.

Parameters
ThreadThe thread to check.
Returns
true if the list contains the specified thread; otherwise, false.

◆ HeartBeat() [1/2]

void DirectOutput.General.ThreadInfoList.HeartBeat ( object HostObject = null)

Calls the HeartBeat method of the ThreadInfo object for the specified thread.
If the specified thread does not have a ThreadInfo object in the list, a new ThreadInfo object will be instanciated and added to the list.

Note
This method has to be called by the thread to be monitored.
Warning
If you are using this method in you code, please dont forget to call ThreadTerminates before the thread exits. This will allow the system to free up the resources used by the thread.
Parameters
HostObjectThe object hosting the thread to be monitored.

◆ HeartBeat() [2/2]

void DirectOutput.General.ThreadInfoList.HeartBeat ( string HostObjectName)

Calls the HeartBeat method of the ThreadInfo object for the specified thread.
If the specified thread does not have a ThreadInfo object in the list, a new ThreadInfo object will be instanciated and added to the list.

Note
This method has to be called by the thread to be monitored.
Warning
If you are using this method in you code, please dont forget to call ThreadTerminates before the thread exits. This will allow the system to free up the resources used by the thread.
Parameters
HostObjectNameThe name of the object hosting the thread.

◆ RecordException()

void DirectOutput.General.ThreadInfoList.RecordException ( Exception Exception,
object HostObject = null )

This method records a exception which has been captured.

Note
This method has to be called by the thread to be monitored.
Parameters
ExceptionThe exception to record.
HostObjectThe host object

◆ ThreadTerminates()

void DirectOutput.General.ThreadInfoList.ThreadTerminates ( )

Has to be called by the thread before it terminates.
This command removes the thread from the List, so the system can clean up the resources used by the thread.

Note
This method has to be called by the thread to be monitored.
Warning
Dont forget to call this method if you are using this class to monitor a threads activity.

Property Documentation

◆ this[Thread Thread]

ThreadInfo DirectOutput.General.ThreadInfoList.this[Thread Thread]
get

Gets the ThreadInfo object for the specified thread.

Parameters
ThreadThe thread for which to lookup the ThreadInfoObject.
Returns
Exceptions
System.ArgumentExceptionThe ThreadInfoList does not contain a ThreadInfo object for thread {0}..Build(Thread.Name);Thread

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