RanorexRanorex Documentation
Watchdog Class
NamespacesRanorex.CoreWatchdog
Provides a way to abort a thread after a specified timeout.
Declaration Syntax
C#Visual BasicVisual C++
public class Watchdog : IDisposable
Public Class Watchdog _
	Implements IDisposable
public ref class Watchdog : IDisposable
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
Watchdog(Object, Duration)
Constructs a new instance.

Watchdog(Object, Duration, Thread)
Constructs a new instance.

CheckAbortSynchronous()()()
Can be called by the watched thread (and the watched thread only) to force the watchdog to check the timeout and consequently abort synchronously.

Dispose()()()
Releases all resources held by this instance.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
When the instance is finalized, frees all resources of the instance.
(Overrides Object.Finalize()()().)
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
ToString()()()
Returns a string that represents the current object.
(Inherited from Object.)
WatchedThread
The Thread that is watched and aborted if the timeout is elapsed.

Remarks
When the timeout is reached, the WatchedThread is aborted by calling Abort(Object) on the thread. If you specify a state object in the Watchdog(Object, Duration) constructor, that object is set to the ExceptionState of the ThreadAbortException that is raised when the WatchedThread is aborted due to the timeout being elapsed.

Note that an asynchronous abort of the watched thread is done not before 150% of the specified timeout are reached. Call the CheckAbortSynchronous()()() method from the watched thread to abort the watched thread synchronously when the timeout is reached, but before the asynchronous abort happens.

Inheritance Hierarchy
Object
Watchdog

Assembly: Ranorex.Core (Module: Ranorex.Core) Version: 4.0.3.22982 (4.0.3.22982)