mscorlib(4.0.0.0) API with additions
System.Diagnostics Namespace Reference

Classes

class  BooleanSwitch
 Provides a simple on/off switch that controls debugging and tracing output. More...
 
class  ConditionalAttribute
 Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined. More...
 
class  ConsoleTraceListener
 Directs tracing or debugging output to either the standard output or the standard error stream. More...
 
class  CorrelationManager
 Correlates traces that are part of a logical transaction. More...
 
class  CounterCreationData
 Defines the counter type, name, and Help string for a custom counter. More...
 
class  CounterCreationDataCollection
 Provides a strongly typed collection of T:System.Diagnostics.CounterCreationData objects. More...
 
struct  CounterSample
 Defines a structure that holds the raw data for a performance counter. More...
 
class  CounterSampleCalculator
 Provides a set of utility functions for interpreting performance counter data. More...
 
class  DataReceivedEventArgs
 Provides data for the E:System.Diagnostics.Process.OutputDataReceived and E:System.Diagnostics.Process.ErrorDataReceived events. More...
 
class  Debug
 Provides a set of methods and properties that help debug your code. More...
 
class  DebuggableAttribute
 Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited. More...
 
class  Debugger
 Enables communication with a debugger. This class cannot be inherited. More...
 
class  DebuggerBrowsableAttribute
 Determines if and how a member is displayed in the debugger variable windows. This class cannot be inherited. More...
 
class  DebuggerDisplayAttribute
 Determines how a class or field is displayed in the debugger variable windows. More...
 
class  DebuggerHiddenAttribute
 Specifies the T:System.Diagnostics.DebuggerHiddenAttribute. This class cannot be inherited. More...
 
class  DebuggerNonUserCodeAttribute
 Identifies a type or member that is not part of the user code for an application. More...
 
class  DebuggerStepperBoundaryAttribute
 Indicates the code following the attribute is to be executed in run, not step, mode. More...
 
class  DebuggerStepThroughAttribute
 Instructs the debugger to step through the code instead of stepping into the code. This class cannot be inherited. More...
 
class  DebuggerTypeProxyAttribute
 Specifies the display proxy for a type. More...
 
class  DebuggerVisualizerAttribute
 Specifies that the type has a visualizer. This class cannot be inherited. More...
 
class  DefaultTraceListener
 Provides the default output methods and behavior for tracing. More...
 
class  DelimitedListTraceListener
 Directs tracing or debugging output to a text writer, such as a stream writer, or to a stream, such as a file stream. More...
 
class  DiagnosticsConfigurationHandler
 Handles the diagnostics section of configuration files. More...
 
class  EntryWrittenEventArgs
 Provides data for the E:System.Diagnostics.EventLog.EntryWritten event. More...
 
class  EventInstance
 Represents language-neutral information for an event log entry. More...
 
class  EventLog
 Provides interaction with Windows event logs. More...
 
class  EventLogEntry
 Encapsulates a single record in the event log. This class cannot be inherited. More...
 
class  EventLogEntryCollection
 Defines size and enumerators for a collection of T:System.Diagnostics.EventLogEntry instances. More...
 
class  EventLogPermission
 Controls code access permissions for event logging. More...
 
class  EventLogPermissionAttribute
 Allows declaritive permission checks for event logging. More...
 
class  EventLogPermissionEntry
 Defines the smallest unit of a code access security permission that is set for an T:System.Diagnostics.EventLog. More...
 
class  EventLogPermissionEntryCollection
 Contains a strongly typed collection of T:System.Diagnostics.EventLogPermissionEntry objects. More...
 
class  EventLogTraceListener
 Provides a simple listener that directs tracing or debugging output to an T:System.Diagnostics.EventLog. More...
 
class  EventSchemaTraceListener
 Directs tracing or debugging output of end-to-end events to an XML-encoded, schema-compliant log file. More...
 
class  EventSourceCreationData
 Represents the configuration settings used to create an event log source on the local computer or a remote computer. More...
 
class  EventTypeFilter
 Indicates whether a listener should trace based on the event type. More...
 
class  FileVersionInfo
 Provides version information for a physical file on disk. More...
 
interface  ICollectData
 Prepares performance data for the performance DLL the system loads when working with performance counters. More...
 
class  InstanceData
 Holds instance data associated with a performance counter sample. More...
 
class  InstanceDataCollection
 Provides a strongly typed collection of T:System.Diagnostics.InstanceData objects. More...
 
class  InstanceDataCollectionCollection
 Provides a strongly typed collection of T:System.Diagnostics.InstanceDataCollection objects. More...
 
class  MonitoringDescriptionAttribute
 Specifies a description for a property or event. More...
 
class  PerformanceCounter
 Represents a Windows NT performance counter component. More...
 
class  PerformanceCounterCategory
 Represents a performance object, which defines a category of performance counters. More...
 
class  PerformanceCounterManager
 Prepares performance data for the performance.dll the system loads when working with performance counters. More...
 
class  PerformanceCounterPermission
 Allows control of code access permissions for T:System.Diagnostics.PerformanceCounter. More...
 
class  PerformanceCounterPermissionAttribute
 Allows declaritive performance counter permission checks. More...
 
class  PerformanceCounterPermissionEntry
 Defines the smallest unit of a code access security permission that is set for a T:System.Diagnostics.PerformanceCounter. More...
 
class  PerformanceCounterPermissionEntryCollection
 Contains a strongly typed collection of T:System.Diagnostics.PerformanceCounterPermissionEntry objects. More...
 
class  Process
 Provides access to local and remote processes and enables you to start and stop local system processes.To browse the .NET Framework source code for this type, see the Reference Source. More...
 
class  ProcessModule
 Represents a.dll or .exe file that is loaded into a particular process. More...
 
class  ProcessModuleCollection
 Provides a strongly typed collection of T:System.Diagnostics.ProcessModule objects. More...
 
class  ProcessStartInfo
 Specifies a set of values that are used when you start a process. More...
 
class  ProcessThread
 Represents an operating system process thread. More...
 
class  ProcessThreadCollection
 Provides a strongly typed collection of T:System.Diagnostics.ProcessThread objects. More...
 
class  SourceFilter
 Indicates whether a listener should trace a message based on the source of a trace. More...
 
class  SourceSwitch
 Provides a multilevel switch to control tracing and debug output without recompiling your code. More...
 
class  StackFrame
 Provides information about a T:System.Diagnostics.StackFrame, which represents a function call on the call stack for the current thread. More...
 
class  StackFrameExtensions
 Provides extension methods for the T:System.Diagnostics.StackFrame class, which represents a function call on the call stack for the current thread. More...
 
class  StackTrace
 Represents a stack trace, which is an ordered collection of one or more stack frames. More...
 
class  Stopwatch
 Provides a set of methods and properties that you can use to accurately measure elapsed time.To browse the .NET Framework source code for this type, see the Reference Source. More...
 
class  Switch
 Provides an abstract base class to create new debugging and tracing switches. More...
 
class  SwitchAttribute
 Identifies a switch used in an assembly, class, or member. More...
 
class  SwitchLevelAttribute
 Identifies the level type for a switch. More...
 
class  TextWriterTraceListener
 Directs tracing or debugging output to a T:System.IO.TextWriter or to a T:System.IO.Stream, such as T:System.IO.FileStream. More...
 
class  Trace
 Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited. More...
 
class  TraceEventCache
 Provides trace event data specific to a thread and a process. More...
 
class  TraceFilter
 Provides the base class for trace filter implementations. More...
 
class  TraceListener
 Provides the abstract base class for the listeners who monitor trace and debug output. More...
 
class  TraceListenerCollection
 Provides a thread-safe list of T:System.Diagnostics.TraceListener objects. More...
 
class  TraceSource
 Provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source. More...
 
class  TraceSwitch
 Provides a multilevel switch to control tracing and debug output without recompiling your code. More...
 
class  UnescapedXmlDiagnosticData
 Provides unescaped XML data for the logging of user-provided trace data. More...
 
class  XmlWriterTraceListener
 Directs tracing or debugging output as XML-encoded data to a T:System.IO.TextWriter or to a T:System.IO.Stream, such as a T:System.IO.FileStream. More...
 

Enumerations

enum  AssertFilters { FailDebug, FailIgnore, FailTerminate, FailContinueFilter }
 
enum  DebuggerBrowsableState { DebuggerBrowsableState.Never = 0, DebuggerBrowsableState.Collapsed = 2, DebuggerBrowsableState.RootHidden = 3 }
 Provides display instructions for the debugger. More...
 
enum  EventLogEntryType {
  EventLogEntryType.Error = 1, EventLogEntryType.Warning = 2, EventLogEntryType.Information = 4, EventLogEntryType.SuccessAudit = 8,
  EventLogEntryType.FailureAudit = 0x10
}
 Specifies the event type of an event log entry. More...
 
enum  EventLogPermissionAccess {
  EventLogPermissionAccess.None = 0x0, EventLogPermissionAccess.Write = 0x10, EventLogPermissionAccess.Administer = 0x30, EventLogPermissionAccess.Browse = 0x2,
  EventLogPermissionAccess.Instrument = 0x6, EventLogPermissionAccess.Audit = 0xA
}
 Defines access levels used by T:System.Diagnostics.EventLog permission classes. More...
 
enum  InitState { NotInitialized, Initializing, Initialized }
 
enum  LoggingLevels {
  TraceLevel0 = 0, TraceLevel1 = 1, TraceLevel2 = 2, TraceLevel3 = 3,
  TraceLevel4 = 4, StatusLevel0 = 20, StatusLevel1 = 21, StatusLevel2 = 22,
  StatusLevel3 = 23, StatusLevel4 = 24, WarningLevel = 40, ErrorLevel = 50,
  PanicLevel = 100
}
 
enum  OverflowAction { OverflowAction.DoNotOverwrite = -1, OverflowAction.OverwriteAsNeeded, OverflowAction.OverwriteOlder }
 Specifies how to handle entries in an event log that has reached its maximum file size. More...
 
enum  PerformanceCounterCategoryOptions { EnableReuse = 0x1, UseUniqueSharedMemory = 0x2 }
 
enum  PerformanceCounterCategoryType { PerformanceCounterCategoryType.Unknown = -1, PerformanceCounterCategoryType.SingleInstance, PerformanceCounterCategoryType.MultiInstance }
 Indicates whether the performance counter category can have multiple instances. More...
 
enum  PerformanceCounterInstanceLifetime { PerformanceCounterInstanceLifetime.Global, PerformanceCounterInstanceLifetime.Process }
 Specifies the lifetime of a performance counter instance. More...
 
enum  PerformanceCounterPermissionAccess {
  PerformanceCounterPermissionAccess.Browse = 0x1, PerformanceCounterPermissionAccess.Instrument = 0x3, PerformanceCounterPermissionAccess.None = 0x0, PerformanceCounterPermissionAccess.Read = 0x1,
  PerformanceCounterPermissionAccess.Write = 0x2, PerformanceCounterPermissionAccess.Administer = 0x7
}
 Defines access levels used by T:System.Diagnostics.PerformanceCounter permission classes. More...
 
enum  PerformanceCounterType {
  PerformanceCounterType.NumberOfItems32 = 0x10000, PerformanceCounterType.NumberOfItems64 = 65792, PerformanceCounterType.NumberOfItemsHEX32 = 0, PerformanceCounterType.NumberOfItemsHEX64 = 0x100,
  PerformanceCounterType.RateOfCountsPerSecond32 = 272696320, PerformanceCounterType.RateOfCountsPerSecond64 = 272696576, PerformanceCounterType.CountPerTimeInterval32 = 4523008, PerformanceCounterType.CountPerTimeInterval64 = 4523264,
  PerformanceCounterType.RawFraction = 537003008, PerformanceCounterType.RawBase = 1073939459, PerformanceCounterType.AverageTimer32 = 805438464, PerformanceCounterType.AverageBase = 1073939458,
  PerformanceCounterType.AverageCount64 = 1073874176, PerformanceCounterType.SampleFraction = 549585920, PerformanceCounterType.SampleCounter = 4260864, PerformanceCounterType.SampleBase = 1073939457,
  PerformanceCounterType.CounterTimer = 541132032, PerformanceCounterType.CounterTimerInverse = 557909248, PerformanceCounterType.Timer100Ns = 542180608, PerformanceCounterType.Timer100NsInverse = 558957824,
  PerformanceCounterType.ElapsedTime = 807666944, PerformanceCounterType.CounterMultiTimer = 574686464, PerformanceCounterType.CounterMultiTimerInverse = 591463680, PerformanceCounterType.CounterMultiTimer100Ns = 575735040,
  PerformanceCounterType.CounterMultiTimer100NsInverse = 592512256, PerformanceCounterType.CounterMultiBase = 1107494144, PerformanceCounterType.CounterDelta32 = 4195328, PerformanceCounterType.CounterDelta64 = 4195584
}
 Specifies the formula used to calculate the M:System.Diagnostics.PerformanceCounter.NextValue method for a T:System.Diagnostics.PerformanceCounter instance. More...
 
enum  ProcessPriorityClass {
  ProcessPriorityClass.Normal = 0x20, ProcessPriorityClass.Idle = 0x40, ProcessPriorityClass.High = 0x80, ProcessPriorityClass.RealTime = 0x100,
  ProcessPriorityClass.BelowNormal = 0x4000, ProcessPriorityClass.AboveNormal = 0x8000
}
 Indicates the priority that the system associates with a process. This value, together with the priority value of each thread of the process, determines each thread's base priority level. More...
 
enum  ProcessWindowStyle { ProcessWindowStyle.Normal, ProcessWindowStyle.Hidden, ProcessWindowStyle.Minimized, ProcessWindowStyle.Maximized }
 Specified how a new window should appear when the system starts a process. More...
 
enum  SourceLevels {
  SourceLevels.Off = 0x0, SourceLevels.Critical = 0x1, SourceLevels.Error = 0x3, SourceLevels.Warning = 0x7,
  SourceLevels.Information = 0xF, SourceLevels.Verbose = 0x1F, SourceLevels.ActivityTracing = 0xFF00, SourceLevels.All = -1
}
 Specifies the levels of trace messages filtered by the source switch and event type filter. More...
 
enum  ThreadPriorityLevel {
  ThreadPriorityLevel.Idle = -15, ThreadPriorityLevel.Lowest = -2, ThreadPriorityLevel.BelowNormal = -1, ThreadPriorityLevel.Normal = 0,
  ThreadPriorityLevel.AboveNormal = 1, ThreadPriorityLevel.Highest = 2, ThreadPriorityLevel.TimeCritical = 0xF
}
 Specifies the priority level of a thread. More...
 
enum  ThreadState {
  ThreadState.Initialized, ThreadState.Ready, ThreadState.Running, ThreadState.Standby,
  ThreadState.Terminated, ThreadState.Wait, ThreadState.Transition, ThreadState.Unknown
}
 Specifies the current execution state of the thread. More...
 
enum  ThreadWaitReason {
  ThreadWaitReason.Executive, ThreadWaitReason.FreePage, ThreadWaitReason.PageIn, ThreadWaitReason.SystemAllocation,
  ThreadWaitReason.ExecutionDelay, ThreadWaitReason.Suspended, ThreadWaitReason.UserRequest, ThreadWaitReason.EventPairHigh,
  ThreadWaitReason.EventPairLow, ThreadWaitReason.LpcReceive, ThreadWaitReason.LpcReply, ThreadWaitReason.VirtualMemory,
  ThreadWaitReason.PageOut, ThreadWaitReason.Unknown
}
 Specifies the reason a thread is waiting. More...
 
enum  TraceEventType {
  TraceEventType.Critical = 1, TraceEventType.Error = 2, TraceEventType.Warning = 4, TraceEventType.Information = 8,
  TraceEventType.Verbose = 0x10, TraceEventType.Start = 0x100, TraceEventType.Stop = 0x200, TraceEventType.Suspend = 0x400,
  TraceEventType.Resume = 0x800, TraceEventType.Transfer = 0x1000
}
 Identifies the type of event that has caused the trace. More...
 
enum  TraceLevel {
  TraceLevel.Off, TraceLevel.Error, TraceLevel.Warning, TraceLevel.Info,
  TraceLevel.Verbose
}
 Specifies what messages to output for the T:System.Diagnostics.Debug, T:System.Diagnostics.Trace and T:System.Diagnostics.TraceSwitch classes. More...
 
enum  TraceLogRetentionOption {
  TraceLogRetentionOption.SingleFileUnboundedSize = 2, TraceLogRetentionOption.SingleFileBoundedSize = 4, TraceLogRetentionOption.UnlimitedSequentialFiles = 0, TraceLogRetentionOption.LimitedSequentialFiles = 3,
  TraceLogRetentionOption.LimitedCircularFiles = 1
}
 Specifies the file structure that will be used for the T:System.Diagnostics.EventSchemaTraceListener log. More...
 
enum  TraceOptions {
  TraceOptions.None = 0x0, TraceOptions.LogicalOperationStack = 0x1, TraceOptions.DateTime = 0x2, TraceOptions.Timestamp = 0x4,
  TraceOptions.ProcessId = 0x8, TraceOptions.ThreadId = 0x10, TraceOptions.Callstack = 0x20
}
 Specifies trace data options to be written to the trace output. More...
 

Functions

delegate void DataReceivedEventHandler (object sender, DataReceivedEventArgs e)
 Represents the method that will handle the E:System.Diagnostics.Process.OutputDataReceived event or E:System.Diagnostics.Process.ErrorDataReceived event of a T:System.Diagnostics.Process. More...
 
delegate void EntryWrittenEventHandler (object sender, EntryWrittenEventArgs e)
 Represents the method that will handle the E:System.Diagnostics.EventLog.EntryWritten event of an T:System.Diagnostics.EventLog. More...
 
internal delegate void LogMessageEventHandler (LoggingLevels level, LogSwitch category, string message, StackTrace location)
 
internal delegate void LogSwitchLevelHandler (LogSwitch ls, LoggingLevels newLevel)
 
internal delegate void UserCallBack (string data)
 

Enumeration Type Documentation

◆ DebuggerBrowsableState

Provides display instructions for the debugger.

Enumerator
Never 

Never show the element.

Collapsed 

Show the element as collapsed.

RootHidden 

Do not display the root element; display the child elements if the element is a collection or array of items.

Definition at line 8 of file DebuggerBrowsableState.cs.

◆ EventLogEntryType

Specifies the event type of an event log entry.

Enumerator
Error 

An error event. This indicates a significant problem the user should know about; usually a loss of functionality or data.

Warning 

A warning event. This indicates a problem that is not immediately significant, but that may signify conditions that could cause future problems.

Information 

An information event. This indicates a significant, successful operation.

SuccessAudit 

A success audit event. This indicates a security event that occurs when an audited access attempt is successful; for example, logging on successfully.

FailureAudit 

A failure audit event. This indicates a security event that occurs when an audited access attempt fails; for example, a failed attempt to open a file.

Definition at line 4 of file EventLogEntryType.cs.

◆ EventLogPermissionAccess

Defines access levels used by T:System.Diagnostics.EventLog permission classes.

Enumerator
None 

The T:System.Diagnostics.EventLog has no permissions.

Write 

The T:System.Diagnostics.EventLog can write to existing logs, and create event sources and logs.

Administer 

The T:System.Diagnostics.EventLog can create an event source, read existing logs, delete event sources or logs, respond to entries, clear an event log, listen to events, and access a collection of all event logs.

Browse 

The T:System.Diagnostics.EventLog can read existing logs. Note This member is now obsolete, use F:System.Diagnostics.EventLogPermissionAccess.Administer instead.

Instrument 

The T:System.Diagnostics.EventLog can read or write to existing logs, and create event sources and logs. Note This member is now obsolete, use F:System.Diagnostics.EventLogPermissionAccess.Write instead.

Audit 

The T:System.Diagnostics.EventLog can read existing logs, delete event sources or logs, respond to entries, clear an event log, listen to events, and access a collection of all event logs. Note This member is now obsolete, use F:System.Diagnostics.EventLogPermissionAccess.Administer instead.

Definition at line 5 of file EventLogPermissionAccess.cs.

◆ OverflowAction

Specifies how to handle entries in an event log that has reached its maximum file size.

Enumerator
DoNotOverwrite 

Indicates that existing entries are retained when the event log is full and new entries are discarded.

OverwriteAsNeeded 

Indicates that each new entry overwrites the oldest entry when the event log is full.

OverwriteOlder 

Indicates that new events overwrite events older than specified by the P:System.Diagnostics.EventLog.MinimumRetentionDays property value when the event log is full. New events are discarded if the event log is full and there are no events older than specified by the P:System.Diagnostics.EventLog.MinimumRetentionDays property value.

Definition at line 4 of file OverflowAction.cs.

◆ PerformanceCounterCategoryType

Indicates whether the performance counter category can have multiple instances.

Enumerator
Unknown 

The instance functionality for the performance counter category is unknown.

SingleInstance 

The performance counter category can have only a single instance.

MultiInstance 

The performance counter category can have multiple instances.

Definition at line 4 of file PerformanceCounterCategoryType.cs.

◆ PerformanceCounterInstanceLifetime

Specifies the lifetime of a performance counter instance.

Enumerator
Global 

Remove the performance counter instance when no counters are using the process category.

Process 

Remove the performance counter instance when the process is closed.

Definition at line 4 of file PerformanceCounterInstanceLifetime.cs.

◆ PerformanceCounterPermissionAccess

Defines access levels used by T:System.Diagnostics.PerformanceCounter permission classes.

Enumerator
Browse 

The T:System.Diagnostics.PerformanceCounter can read categories.

Instrument 

The T:System.Diagnostics.PerformanceCounter can read and write categories.

None 

The T:System.Diagnostics.PerformanceCounter has no permissions.

Read 

The T:System.Diagnostics.PerformanceCounter can read categories.

Write 

The T:System.Diagnostics.PerformanceCounter can write categories.

Administer 

The T:System.Diagnostics.PerformanceCounter can read, write, and create categories.

Definition at line 5 of file PerformanceCounterPermissionAccess.cs.

◆ PerformanceCounterType

Specifies the formula used to calculate the M:System.Diagnostics.PerformanceCounter.NextValue method for a T:System.Diagnostics.PerformanceCounter instance.

Enumerator
NumberOfItems32 

An instantaneous counter that shows the most recently observed value. Used, for example, to maintain a simple count of items or operations.

NumberOfItems64 

An instantaneous counter that shows the most recently observed value. Used, for example, to maintain a simple count of a very large number of items or operations. It is the same as NumberOfItems32 except that it uses larger fields to accommodate larger values.

NumberOfItemsHEX32 

An instantaneous counter that shows the most recently observed value in hexadecimal format. Used, for example, to maintain a simple count of items or operations.

NumberOfItemsHEX64 

An instantaneous counter that shows the most recently observed value. Used, for example, to maintain a simple count of a very large number of items or operations. It is the same as NumberOfItemsHEX32 except that it uses larger fields to accommodate larger values.

RateOfCountsPerSecond32 

A difference counter that shows the average number of operations completed during each second of the sample interval. Counters of this type measure time in ticks of the system clock.

RateOfCountsPerSecond64 

A difference counter that shows the average number of operations completed during each second of the sample interval. Counters of this type measure time in ticks of the system clock. This counter type is the same as the RateOfCountsPerSecond32 type, but it uses larger fields to accommodate larger values to track a high-volume number of items or operations per second, such as a byte-transmission rate.

CountPerTimeInterval32 

An average counter designed to monitor the average length of a queue to a resource over time. It shows the difference between the queue lengths observed during the last two sample intervals divided by the duration of the interval. This type of counter is typically used to track the number of items that are queued or waiting.

CountPerTimeInterval64 

An average counter that monitors the average length of a queue to a resource over time. Counters of this type display the difference between the queue lengths observed during the last two sample intervals, divided by the duration of the interval. This counter type is the same as CountPerTimeInterval32 except that it uses larger fields to accommodate larger values. This type of counter is typically used to track a high-volume or very large number of items that are queued or waiting.

RawFraction 

An instantaneous percentage counter that shows the ratio of a subset to its set as a percentage. For example, it compares the number of bytes in use on a disk to the total number of bytes on the disk. Counters of this type display the current percentage only, not an average over time.

RawBase 

A base counter that stores the denominator of a counter that presents a general arithmetic fraction. Check that this value is greater than zero before using it as the denominator in a RawFraction value calculation.

AverageTimer32 

An average counter that measures the time it takes, on average, to complete a process or operation. Counters of this type display a ratio of the total elapsed time of the sample interval to the number of processes or operations completed during that time. This counter type measures time in ticks of the system clock.

AverageBase 

A base counter that is used in the calculation of time or count averages, such as AverageTimer32 and AverageCount64. Stores the denominator for calculating a counter to present "time per operation" or "count per operation".

AverageCount64 

An average counter that shows how many items are processed, on average, during an operation. Counters of this type display a ratio of the items processed to the number of operations completed. The ratio is calculated by comparing the number of items processed during the last interval to the number of operations completed during the last interval.

SampleFraction 

A percentage counter that shows the average ratio of hits to all operations during the last two sample intervals.

SampleCounter 

An average counter that shows the average number of operations completed in one second. When a counter of this type samples the data, each sampling interrupt returns one or zero. The counter data is the number of ones that were sampled. It measures time in units of ticks of the system performance timer.

SampleBase 

A base counter that stores the number of sampling interrupts taken and is used as a denominator in the sampling fraction. The sampling fraction is the number of samples that were 1 (or true) for a sample interrupt. Check that this value is greater than zero before using it as the denominator in a calculation of SampleFraction.

CounterTimer 

A percentage counter that shows the average time that a component is active as a percentage of the total sample time.

CounterTimerInverse 

A percentage counter that displays the average percentage of active time observed during sample interval. The value of these counters is calculated by monitoring the percentage of time that the service was inactive and then subtracting that value from 100 percent.

Timer100Ns 

A percentage counter that shows the active time of a component as a percentage of the total elapsed time of the sample interval. It measures time in units of 100 nanoseconds (ns). Counters of this type are designed to measure the activity of one component at a time.

Timer100NsInverse 

A percentage counter that shows the average percentage of active time observed during the sample interval.

ElapsedTime 

A difference timer that shows the total time between when the component or process started and the time when this value is calculated.

CounterMultiTimer 

A percentage counter that displays the active time of one or more components as a percentage of the total time of the sample interval. Because the numerator records the active time of components operating simultaneously, the resulting percentage can exceed 100 percent.

CounterMultiTimerInverse 

A percentage counter that shows the active time of one or more components as a percentage of the total time of the sample interval. It derives the active time by measuring the time that the components were not active and subtracting the result from 100 percent by the number of objects monitored.

CounterMultiTimer100Ns 

A percentage counter that shows the active time of one or more components as a percentage of the total time of the sample interval. It measures time in 100 nanosecond (ns) units.

CounterMultiTimer100NsInverse 

A percentage counter that shows the active time of one or more components as a percentage of the total time of the sample interval. Counters of this type measure time in 100 nanosecond (ns) units. They derive the active time by measuring the time that the components were not active and subtracting the result from multiplying 100 percent by the number of objects monitored.

CounterMultiBase 

A base counter that indicates the number of items sampled. It is used as the denominator in the calculations to get an average among the items sampled when taking timings of multiple, but similar items. Used with CounterMultiTimer, CounterMultiTimerInverse, CounterMultiTimer100Ns, and CounterMultiTimer100NsInverse.

CounterDelta32 

A difference counter that shows the change in the measured attribute between the two most recent sample intervals.

CounterDelta64 

A difference counter that shows the change in the measured attribute between the two most recent sample intervals. It is the same as the CounterDelta32 counter type except that is uses larger fields to accomodate larger values.

Definition at line 7 of file PerformanceCounterType.cs.

◆ ProcessPriorityClass

Indicates the priority that the system associates with a process. This value, together with the priority value of each thread of the process, determines each thread's base priority level.

Enumerator
Normal 

Specifies that the process has no special scheduling needs.

Idle 

Specifies that the threads of this process run only when the system is idle, such as a screen saver. The threads of the process are preempted by the threads of any process running in a higher priority class.

High 

Specifies that the process performs time-critical tasks that must be executed immediately, such as the Task List dialog, which must respond quickly when called by the user, regardless of the load on the operating system. The threads of the process preempt the threads of normal or idle priority class processes.

RealTime 

Specifies that the process has the highest possible priority.

BelowNormal 

Specifies that the process has priority above Idle but below Normal.

AboveNormal 

Specifies that the process has priority above Normal but below F:System.Diagnostics.ProcessPriorityClass.High.

Definition at line 4 of file ProcessPriorityClass.cs.

◆ ProcessWindowStyle

Specified how a new window should appear when the system starts a process.

Enumerator
Normal 

The normal, visible window style. The system displays a window with Normal style on the screen, in a default location. If a window is visible, the user can supply input to the window and view the window's output. Frequently, an application may initialize a new window to the Hidden style while it customizes the window's appearance, and then make the window style Normal.

Hidden 

The hidden window style. A window can be either visible or hidden. The system displays a hidden window by not drawing it. If a window is hidden, it is effectively disabled. A hidden window can process messages from the system or from other windows, but it cannot process input from the user or display output. Frequently, an application may keep a new window hidden while it customizes the window's appearance, and then make the window style Normal. To use F:System.Diagnostics.ProcessWindowStyle.Hidden, the P:System.Diagnostics.ProcessStartInfo.UseShellExecute property must be false.

Minimized 

The minimized window style. By default, the system reduces a minimized window to the size of its taskbar button and moves the minimized window to the taskbar.

Maximized 

The maximized window style. By default, the system enlarges a maximized window so that it fills the screen or, in the case of a child window, the parent window's client area. If the window has a title bar, the system automatically moves it to the top of the screen or to the top of the parent window's client area. Also, the system disables the window's sizing border and the window-positioning capability of the title bar so that the user cannot move the window by dragging the title bar.

Definition at line 4 of file ProcessWindowStyle.cs.

◆ SourceLevels

Specifies the levels of trace messages filtered by the source switch and event type filter.

Enumerator
Off 

Does not allow any events through.

Critical 

Allows only F:System.Diagnostics.TraceEventType.Critical events through.

Error 

Allows F:System.Diagnostics.TraceEventType.Critical and F:System.Diagnostics.TraceEventType.Error events through.

Warning 

Allows F:System.Diagnostics.TraceEventType.Critical, F:System.Diagnostics.TraceEventType.Error, and F:System.Diagnostics.TraceEventType.Warning events through.

Information 

Allows F:System.Diagnostics.TraceEventType.Critical, F:System.Diagnostics.TraceEventType.Error, F:System.Diagnostics.TraceEventType.Warning, and F:System.Diagnostics.TraceEventType.Information events through.

Verbose 

Allows F:System.Diagnostics.TraceEventType.Critical, F:System.Diagnostics.TraceEventType.Error, F:System.Diagnostics.TraceEventType.Warning, F:System.Diagnostics.TraceEventType.Information, and F:System.Diagnostics.TraceEventType.Verbose events through.

ActivityTracing 

Allows the F:System.Diagnostics.TraceEventType.Stop, F:System.Diagnostics.TraceEventType.Start, F:System.Diagnostics.TraceEventType.Suspend, F:System.Diagnostics.TraceEventType.Transfer, and F:System.Diagnostics.TraceEventType.Resume events through.

All 

Allows all events through.

Definition at line 7 of file SourceLevels.cs.

◆ ThreadPriorityLevel

Specifies the priority level of a thread.

Enumerator
Idle 

Specifies idle priority. This is the lowest possible priority value of all threads, independent of the value of the associated T:System.Diagnostics.ProcessPriorityClass.

Lowest 

Specifies lowest priority. This is two steps below the normal priority for the associated T:System.Diagnostics.ProcessPriorityClass.

BelowNormal 

Specifies one step below the normal priority for the associated T:System.Diagnostics.ProcessPriorityClass.

Normal 

Specifies normal priority for the associated T:System.Diagnostics.ProcessPriorityClass.

AboveNormal 

Specifies one step above the normal priority for the associated T:System.Diagnostics.ProcessPriorityClass.

Highest 

Specifies highest priority. This is two steps above the normal priority for the associated T:System.Diagnostics.ProcessPriorityClass.

TimeCritical 

Specifies time-critical priority. This is the highest priority of all threads, independent of the value of the associated T:System.Diagnostics.ProcessPriorityClass.

Definition at line 4 of file ThreadPriorityLevel.cs.

◆ ThreadState

Specifies the current execution state of the thread.

Enumerator
Initialized 

A state that indicates the thread has been initialized, but has not yet started.

Ready 

A state that indicates the thread is waiting to use a processor because no processor is free. The thread is prepared to run on the next available processor.

Running 

A state that indicates the thread is currently using a processor.

Standby 

A state that indicates the thread is about to use a processor. Only one thread can be in this state at a time.

Terminated 

A state that indicates the thread has finished executing and has exited.

Wait 

A state that indicates the thread is not ready to use the processor because it is waiting for a peripheral operation to complete or a resource to become free. When the thread is ready, it will be rescheduled.

Transition 

A state that indicates the thread is waiting for a resource, other than the processor, before it can execute. For example, it might be waiting for its execution stack to be paged in from disk.

Unknown 

The state of the thread is unknown.

Definition at line 4 of file ThreadState.cs.

◆ ThreadWaitReason

Specifies the reason a thread is waiting.

Enumerator
Executive 

The thread is waiting for the scheduler.

FreePage 

The thread is waiting for a free virtual memory page.

PageIn 

The thread is waiting for a virtual memory page to arrive in memory.

SystemAllocation 

The thread is waiting for system allocation.

ExecutionDelay 

Thread execution is delayed.

Suspended 

Thread execution is suspended.

UserRequest 

The thread is waiting for a user request.

EventPairHigh 

The thread is waiting for event pair high.

EventPairLow 

The thread is waiting for event pair low.

LpcReceive 

The thread is waiting for a local procedure call to arrive.

LpcReply 

The thread is waiting for reply to a local procedure call to arrive.

VirtualMemory 

The thread is waiting for the system to allocate virtual memory.

PageOut 

The thread is waiting for a virtual memory page to be written to disk.

Unknown 

The thread is waiting for an unknown reason.

Definition at line 4 of file ThreadWaitReason.cs.

◆ TraceEventType

Identifies the type of event that has caused the trace.

Enumerator
Critical 

Fatal error or application crash.

Error 

Recoverable error.

Warning 

Noncritical problem.

Information 

Informational message.

Verbose 

Debugging trace.

Start 

Starting of a logical operation.

Stop 

Stopping of a logical operation.

Suspend 

Suspension of a logical operation.

Resume 

Resumption of a logical operation.

Transfer 

Changing of correlation identity.

Definition at line 6 of file TraceEventType.cs.

◆ TraceLevel

Specifies what messages to output for the T:System.Diagnostics.Debug, T:System.Diagnostics.Trace and T:System.Diagnostics.TraceSwitch classes.

Enumerator
Off 

Output no tracing and debugging messages.

Error 

Output error-handling messages.

Warning 

Output warnings and error-handling messages.

Info 

Output informational messages, warnings, and error-handling messages.

Verbose 

Output all debugging and tracing messages.

Definition at line 4 of file TraceLevel.cs.

◆ TraceLogRetentionOption

Specifies the file structure that will be used for the T:System.Diagnostics.EventSchemaTraceListener log.

Enumerator
SingleFileUnboundedSize 

One file with no maximum file size restriction.

SingleFileBoundedSize 

One file with a maximum file size that is determined by the P:System.Diagnostics.EventSchemaTraceListener.MaximumFileSize property.

UnlimitedSequentialFiles 

An unlimited number of sequential files, each with a maximum file size that is determined by the P:System.Diagnostics.EventSchemaTraceListener.MaximumFileSize property. There is no logical bound to the number or size of the files, but it is limited by the physical constraints imposed by the computer.

LimitedSequentialFiles 

A finite number of sequential files, each with a maximum file size. When the P:System.Diagnostics.EventSchemaTraceListener.MaximumFileSize property value is reached, writing starts in a new file with an incremented integer suffix.

LimitedCircularFiles 

A finite number of sequential files, each with a maximum file size. When the P:System.Diagnostics.EventSchemaTraceListener.MaximumFileSize property value is reached, writing starts in a new file with an incremented integer suffix. When the P:System.Diagnostics.EventSchemaTraceListener.MaximumNumberOfFiles property value is reached, the first file is cleared and overwritten. Files are then incrementally overwritten in a circular manner.

Definition at line 4 of file TraceLogRetentionOption.cs.

◆ TraceOptions

Specifies trace data options to be written to the trace output.

Enumerator
None 

Do not write any elements.

LogicalOperationStack 

Write the logical operation stack, which is represented by the return value of the P:System.Diagnostics.CorrelationManager.LogicalOperationStack property.

DateTime 

Write the date and time.

Timestamp 

Write the timestamp, which is represented by the return value of the M:System.Diagnostics.Stopwatch.GetTimestamp method.

ProcessId 

Write the process identity, which is represented by the return value of the P:System.Diagnostics.Process.Id property.

ThreadId 

Write the thread identity, which is represented by the return value of the P:System.Threading.Thread.ManagedThreadId property for the current thread.

Callstack 

Write the call stack, which is represented by the return value of the P:System.Environment.StackTrace property.

Definition at line 5 of file TraceOptions.cs.

Function Documentation

◆ DataReceivedEventHandler()

delegate void System.Diagnostics.DataReceivedEventHandler ( object  sender,
DataReceivedEventArgs  e 
)

Represents the method that will handle the E:System.Diagnostics.Process.OutputDataReceived event or E:System.Diagnostics.Process.ErrorDataReceived event of a T:System.Diagnostics.Process.

Parameters
senderThe source of the event.
eA T:System.Diagnostics.DataReceivedEventArgs that contains the event data.

◆ EntryWrittenEventHandler()

delegate void System.Diagnostics.EntryWrittenEventHandler ( object  sender,
EntryWrittenEventArgs  e 
)

Represents the method that will handle the E:System.Diagnostics.EventLog.EntryWritten event of an T:System.Diagnostics.EventLog.

Parameters
senderThe source of the event.
eAn T:System.Diagnostics.EntryWrittenEventArgs that contains the event data.