mscorlib(4.0.0.0) API with additions
System.Diagnostics.ProcessThread Class Reference

Represents an operating system process thread. More...

Inheritance diagram for System.Diagnostics.ProcessThread:
[legend]
Collaboration diagram for System.Diagnostics.ProcessThread:
[legend]

Public Member Functions

void ResetIdealProcessor ()
 Resets the ideal processor for this thread to indicate that there is no single ideal processor. In other words, so that any processor is ideal. More...
 
- Public Member Functions inherited from System.ComponentModel.Component
void Dispose ()
 Releases all resources used by the T:System.ComponentModel.Component. More...
 
override string ToString ()
 Returns a T:System.String containing the name of the T:System.ComponentModel.Component, if any. This method should not be overridden. More...
 
- Public Member Functions inherited from System.MarshalByRefObject
object GetLifetimeService ()
 Retrieves the current lifetime service object that controls the lifetime policy for this instance. More...
 
virtual object InitializeLifetimeService ()
 Obtains a lifetime service object to control the lifetime policy for this instance. More...
 
virtual ObjRef CreateObjRef (Type requestedType)
 Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. More...
 

Properties

int BasePriority [get]
 Gets the base priority of the thread. More...
 
int CurrentPriority [get]
 Gets the current priority of the thread. More...
 
int Id [get]
 Gets the unique identifier of the thread. More...
 
int IdealProcessor [set]
 Sets the preferred processor for this thread to run on. More...
 
bool PriorityBoostEnabled [get, set]
 Gets or sets a value indicating whether the operating system should temporarily boost the priority of the associated thread whenever the main window of the thread's process receives the focus. More...
 
ThreadPriorityLevel PriorityLevel [get, set]
 Gets or sets the priority level of the thread. More...
 
TimeSpan PrivilegedProcessorTime [get]
 Gets the amount of time that the thread has spent running code inside the operating system core. More...
 
IntPtr StartAddress [get]
 Gets the memory address of the function that the operating system called that started this thread. More...
 
DateTime StartTime [get]
 Gets the time that the operating system started the thread. More...
 
ThreadState ThreadState [get]
 Gets the current state of this thread. More...
 
TimeSpan TotalProcessorTime [get]
 Gets the total amount of time that this thread has spent using the processor. More...
 
TimeSpan UserProcessorTime [get]
 Gets the amount of time that the associated thread has spent running code inside the application. More...
 
ThreadWaitReason WaitReason [get]
 Gets the reason that the thread is waiting. More...
 
IntPtr ProcessorAffinity [set]
 Sets the processors on which the associated thread can run. More...
 
- Properties inherited from System.ComponentModel.Component
EventHandlerList Events [get]
 Gets the list of event handlers that are attached to this T:System.ComponentModel.Component. More...
 
virtual ISite Site [get, set]
 Gets or sets the T:System.ComponentModel.ISite of the T:System.ComponentModel.Component. More...
 
IContainerContainer [get]
 Gets the T:System.ComponentModel.IContainer that contains the T:System.ComponentModel.Component. More...
 
bool??? DesignMode [get]
 Gets a value that indicates whether the T:System.ComponentModel.Component is currently in design mode. More...
 
EventHandler Disposed
 Occurs when the component is disposed by a call to the M:System.ComponentModel.Component.Dispose method. More...
 
- Properties inherited from System.ComponentModel.IComponent
ISite Site [get, set]
 Gets or sets the T:System.ComponentModel.ISite associated with the T:System.ComponentModel.IComponent. More...
 

Additional Inherited Members

- Protected Member Functions inherited from System.ComponentModel.Component
virtual void Dispose (bool disposing)
 Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources. More...
 
virtual object GetService (Type service)
 Returns an object that represents a service provided by the T:System.ComponentModel.Component or by its T:System.ComponentModel.Container. More...
 
- Protected Member Functions inherited from System.MarshalByRefObject
MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 Creates a shallow copy of the current T:System.MarshalByRefObject object. More...
 
- Protected Attributes inherited from System.ComponentModel.Component
virtual bool CanRaiseEvents => true
 Gets a value indicating whether the component can raise an event. More...
 
- Events inherited from System.ComponentModel.IComponent
EventHandler Disposed
 Represents the method that handles the E:System.ComponentModel.IComponent.Disposed event of a component. More...
 

Detailed Description

Represents an operating system process thread.

Definition at line 12 of file ProcessThread.cs.

Member Function Documentation

◆ ResetIdealProcessor()

void System.Diagnostics.ProcessThread.ResetIdealProcessor ( )

Resets the ideal processor for this thread to indicate that there is no single ideal processor. In other words, so that any processor is ideal.

Exceptions
T:System.ComponentModel.Win32ExceptionThe ideal processor could not be reset.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 360 of file ProcessThread.cs.

Property Documentation

◆ BasePriority

int System.Diagnostics.ProcessThread.BasePriority
get

Gets the base priority of the thread.

Returns
The base priority of the thread, which the operating system computes by combining the process priority class with the priority level of the associated thread.

Definition at line 36 of file ProcessThread.cs.

◆ CurrentPriority

int System.Diagnostics.ProcessThread.CurrentPriority
get

Gets the current priority of the thread.

Returns
The current priority of the thread, which may deviate from the base priority based on how the operating system is scheduling the thread. The priority may be temporarily boosted for an active thread.

Definition at line 47 of file ProcessThread.cs.

◆ Id

int System.Diagnostics.ProcessThread.Id
get

Gets the unique identifier of the thread.

Returns
The unique identifier associated with a specific thread.

Definition at line 58 of file ProcessThread.cs.

◆ IdealProcessor

int System.Diagnostics.ProcessThread.IdealProcessor
set

Sets the preferred processor for this thread to run on.

Returns
The preferred processor for the thread, used when the system schedules threads, to determine which processor to run the thread on.
Exceptions
T:System.ComponentModel.Win32ExceptionThe system could not set the thread to start on the specified processor.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 72 of file ProcessThread.cs.

◆ PriorityBoostEnabled

bool System.Diagnostics.ProcessThread.PriorityBoostEnabled
getset

Gets or sets a value indicating whether the operating system should temporarily boost the priority of the associated thread whenever the main window of the thread's process receives the focus.

Returns
true to boost the thread's priority when the user interacts with the process's interface; otherwise, false. The default is false.
Exceptions
T:System.ComponentModel.Win32ExceptionThe priority boost information could not be retrieved.-or-The priority boost information could not be set.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 99 of file ProcessThread.cs.

◆ PriorityLevel

ThreadPriorityLevel System.Diagnostics.ProcessThread.PriorityLevel
getset

Gets or sets the priority level of the thread.

Returns
One of the T:System.Diagnostics.ThreadPriorityLevel values, specifying a range that bounds the thread's priority.
Exceptions
T:System.ComponentModel.Win32ExceptionThe thread priority level information could not be retrieved. -or-The thread priority level could not be set.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 150 of file ProcessThread.cs.

◆ PrivilegedProcessorTime

TimeSpan System.Diagnostics.ProcessThread.PrivilegedProcessorTime
get

Gets the amount of time that the thread has spent running code inside the operating system core.

Returns
A T:System.TimeSpan indicating the amount of time that the thread has spent running code inside the operating system core.
Exceptions
T:System.ComponentModel.Win32ExceptionThe thread time could not be retrieved.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 200 of file ProcessThread.cs.

◆ ProcessorAffinity

IntPtr System.Diagnostics.ProcessThread.ProcessorAffinity
set

Sets the processors on which the associated thread can run.

Returns
An T:System.IntPtr that points to a set of bits, each of which represents a processor that the thread can run on.
Exceptions
T:System.ComponentModel.Win32ExceptionThe processor affinity could not be set.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 307 of file ProcessThread.cs.

◆ StartAddress

IntPtr System.Diagnostics.ProcessThread.StartAddress
get

Gets the memory address of the function that the operating system called that started this thread.

Returns
The thread's starting address, which points to the application-defined function that the thread executes.
Exceptions
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 214 of file ProcessThread.cs.

◆ StartTime

DateTime System.Diagnostics.ProcessThread.StartTime
get

Gets the time that the operating system started the thread.

Returns
A T:System.DateTime representing the time that was on the system when the operating system started the thread.
Exceptions
T:System.ComponentModel.Win32ExceptionThe thread time could not be retrieved.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 229 of file ProcessThread.cs.

◆ ThreadState

ThreadState System.Diagnostics.ProcessThread.ThreadState
get

Gets the current state of this thread.

Returns
A T:System.Diagnostics.ThreadState that indicates the thread's execution, for example, running, waiting, or terminated.
Exceptions
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 243 of file ProcessThread.cs.

◆ TotalProcessorTime

TimeSpan System.Diagnostics.ProcessThread.TotalProcessorTime
get

Gets the total amount of time that this thread has spent using the processor.

Returns
A T:System.TimeSpan that indicates the amount of time that the thread has had control of the processor.
Exceptions
T:System.ComponentModel.Win32ExceptionThe thread time could not be retrieved.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 258 of file ProcessThread.cs.

◆ UserProcessorTime

TimeSpan System.Diagnostics.ProcessThread.UserProcessorTime
get

Gets the amount of time that the associated thread has spent running code inside the application.

Returns
A T:System.TimeSpan indicating the amount of time that the thread has spent running code inside the application, as opposed to inside the operating system core.
Exceptions
T:System.ComponentModel.Win32ExceptionThe thread time could not be retrieved.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 273 of file ProcessThread.cs.

◆ WaitReason

ThreadWaitReason System.Diagnostics.ProcessThread.WaitReason
get

Gets the reason that the thread is waiting.

Returns
A T:System.Diagnostics.ThreadWaitReason representing the reason that the thread is in the wait state.
Exceptions
T:System.InvalidOperationExceptionThe thread is not in the wait state.
T:System.PlatformNotSupportedExceptionThe platform is Windows 98 or Windows Millennium Edition.
T:System.NotSupportedExceptionThe process is on a remote computer.

Definition at line 288 of file ProcessThread.cs.


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