System.Diagnostics
TOC
Collapse the table of content
Expand the table of content

System.Diagnostics Namespace

 

The System.Diagnostics namespace provides classes that allow you to interact with system processes, event logs, and performance counters.

ClassDescription
System_CAPS_pubclassBooleanSwitch

Provides a simple on/off switch that controls debugging and tracing output.

System_CAPS_pubclassConditionalAttribute

Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.

System_CAPS_pubclassConsoleTraceListener

Directs tracing or debugging output to either the standard output or the standard error stream.

System_CAPS_pubclassCorrelationManager

Correlates traces that are part of a logical transaction.

System_CAPS_pubclassCounterCreationData

Defines the counter type, name, and Help string for a custom counter.

System_CAPS_pubclassCounterCreationDataCollection

Provides a strongly typed collection of CounterCreationData objects.

System_CAPS_pubclassCounterSampleCalculator

Provides a set of utility functions for interpreting performance counter data.

System_CAPS_pubclassDataReceivedEventArgs

Provides data for the OutputDataReceived and ErrorDataReceived events.

System_CAPS_pubclassDebug

Provides a set of methods and properties that help debug your code. This class cannot be inherited.

System_CAPS_pubclassDebuggableAttribute

Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited.

System_CAPS_pubclassDebugger

Enables communication with a debugger. This class cannot be inherited.

System_CAPS_pubclassDebuggerBrowsableAttribute

Determines if and how a member is displayed in the debugger variable windows. This class cannot be inherited.

System_CAPS_pubclassDebuggerDisplayAttribute

Determines how a class or field is displayed in the debugger variable windows.

System_CAPS_pubclassDebuggerHiddenAttribute

Specifies the DebuggerHiddenAttribute. This class cannot be inherited.

System_CAPS_pubclassDebuggerNonUserCodeAttribute

Identifies a type or member that is not part of the user code for an application.

System_CAPS_pubclassDebuggerStepperBoundaryAttribute

Indicates the code following the attribute is to be executed in run, not step, mode.

System_CAPS_pubclassDebuggerStepThroughAttribute

Instructs the debugger to step through the code instead of stepping into the code. This class cannot be inherited.

System_CAPS_pubclassDebuggerTypeProxyAttribute

Specifies the display proxy for a type.

System_CAPS_pubclassDebuggerVisualizerAttribute

Specifies that the type has a visualizer. This class cannot be inherited.

System_CAPS_pubclassDefaultTraceListener

Provides the default output methods and behavior for tracing.

System_CAPS_pubclassDelimitedListTraceListener

Directs tracing or debugging output to a text writer, such as a stream writer, or to a stream, such as a file stream.

System_CAPS_pubclassDiagnosticsConfigurationHandler

Obsolete. This API supports the product infrastructure and is not intended to be used directly from your code. Handles the diagnostics section of configuration files.

System_CAPS_pubclassEntryWrittenEventArgs

Provides data for the EntryWritten event.

System_CAPS_pubclassEventInstance

Represents language-neutral information for an event log entry.

System_CAPS_pubclassEventLog

Provides interaction with Windows event logs.

System_CAPS_pubclassEventLogEntry

Encapsulates a single record in the event log. This class cannot be inherited.

System_CAPS_pubclassEventLogEntryCollection

Defines size and enumerators for a collection of EventLogEntry instances.

System_CAPS_pubclassEventLogInstaller

Allows you to install and configure an event log that your application reads from or writes to when running.

System_CAPS_pubclassEventLogPermission

Controls code access permissions for event logging.

System_CAPS_pubclassEventLogPermissionAttribute

Allows declaritive permission checks for event logging.

System_CAPS_pubclassEventLogPermissionEntry

Defines the smallest unit of a code access security permission that is set for an EventLog.

System_CAPS_pubclassEventLogPermissionEntryCollection

Contains a strongly typed collection of EventLogPermissionEntry objects.

System_CAPS_pubclassEventLogTraceListener

Provides a simple listener that directs tracing or debugging output to an EventLog.

System_CAPS_pubclassEventSchemaTraceListener

Directs tracing or debugging output of end-to-end events to an XML-encoded, schema-compliant log file.

System_CAPS_pubclassEventSourceCreationData

Represents the configuration settings used to create an event log source on the local computer or a remote computer.

System_CAPS_pubclassEventTypeFilter

Indicates whether a listener should trace based on the event type.

System_CAPS_pubclassFileVersionInfo

Provides version information for a physical file on disk.

System_CAPS_pubclassInstanceData

Holds instance data associated with a performance counter sample.

System_CAPS_pubclassInstanceDataCollection

Provides a strongly typed collection of InstanceData objects.

System_CAPS_pubclassInstanceDataCollectionCollection

Provides a strongly typed collection of InstanceDataCollection objects.

System_CAPS_pubclassMonitoringDescriptionAttribute

Specifies a description for a property or event.

System_CAPS_pubclassPerformanceCounter

Represents a Windows NT performance counter component.

System_CAPS_pubclassPerformanceCounterCategory

Represents a performance object, which defines a category of performance counters.

System_CAPS_pubclassPerformanceCounterInstaller

Specifies an installer for the PerformanceCounter component.

System_CAPS_pubclassPerformanceCounterManager

Obsolete. This API supports the product infrastructure and is not intended to be used directly from your code. Prepares performance data for the performance.dll the system loads when working with performance counters.

System_CAPS_pubclassPerformanceCounterPermission

Allows control of code access permissions for PerformanceCounter.

System_CAPS_pubclassPerformanceCounterPermissionAttribute

Allows declaritive performance counter permission checks.

System_CAPS_pubclassPerformanceCounterPermissionEntry

Defines the smallest unit of a code access security permission that is set for a PerformanceCounter.

System_CAPS_pubclassPerformanceCounterPermissionEntryCollection

Contains a strongly typed collection of PerformanceCounterPermissionEntry objects.

System_CAPS_pubclassPresentationTraceSources

Provides debug tracing support that is specifically targeted for Windows Presentation Foundation (WPF) applications.

System_CAPS_pubclassProcess

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.

System_CAPS_pubclassProcessModule

Represents a.dll or .exe file that is loaded into a particular process.

System_CAPS_pubclassProcessModuleCollection

Provides a strongly typed collection of ProcessModule objects.

System_CAPS_pubclassProcessStartInfo

Specifies a set of values that are used when you start a process.

System_CAPS_pubclassProcessThread

Represents an operating system process thread.

System_CAPS_pubclassProcessThreadCollection

Provides a strongly typed collection of ProcessThread objects.

System_CAPS_pubclassSourceFilter

Indicates whether a listener should trace a message based on the source of a trace.

System_CAPS_pubclassSourceSwitch

Provides a multilevel switch to control tracing and debug output without recompiling your code.

System_CAPS_pubclassStackFrame

Provides information about a StackFrame, which represents a function call on the call stack for the current thread.

System_CAPS_pubclassStackTrace

Represents a stack trace, which is an ordered collection of one or more stack frames.

System_CAPS_pubclassStopwatch

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.

System_CAPS_pubclassSwitch

Provides an abstract base class to create new debugging and tracing switches.

System_CAPS_pubclassSwitchAttribute

Identifies a switch used in an assembly, class, or member.

System_CAPS_pubclassSwitchLevelAttribute

Identifies the level type for a switch.

System_CAPS_pubclassTextWriterTraceListener

Directs tracing or debugging output to a TextWriter or to a Stream, such as FileStream.

System_CAPS_pubclassTrace

Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited.

System_CAPS_pubclassTraceEventCache

Provides trace event data specific to a thread and a process.

System_CAPS_pubclassTraceFilter

Provides the base class for trace filter implementations.

System_CAPS_pubclassTraceListener

Provides the abstract base class for the listeners who monitor trace and debug output.

System_CAPS_pubclassTraceListenerCollection

Provides a thread-safe list of TraceListener objects.

System_CAPS_pubclassTraceSource

Provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source.

System_CAPS_pubclassTraceSwitch

Provides a multilevel switch to control tracing and debug output without recompiling your code.

System_CAPS_pubclassUnescapedXmlDiagnosticData

Provides unescaped XML data for the logging of user-provided trace data.

System_CAPS_pubclassXmlWriterTraceListener

Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, such as a FileStream.

StructureDescription
System_CAPS_pubstructureCounterSample

Defines a structure that holds the raw data for a performance counter.

InterfaceDescription
System_CAPS_pubinterfaceICollectData

This API supports the product infrastructure and is not intended to be used directly from your code. Prepares performance data for the performance DLL the system loads when working with performance counters.

DelegateDescription
System_CAPS_pubdelegateDataReceivedEventHandler

Represents the method that will handle the OutputDataReceived event or ErrorDataReceived event of a Process.

System_CAPS_pubdelegateEntryWrittenEventHandler

Represents the method that will handle the EntryWritten event of an EventLog.

EnumerationDescription
System_CAPS_pubenumDebuggerBrowsableState

Provides display instructions for the debugger.

System_CAPS_pubenumDebuggableAttribute.DebuggingModes

Specifies the debugging mode for the just-in-time (JIT) compiler.

System_CAPS_pubenumEventLogEntryType

Specifies the event type of an event log entry.

System_CAPS_pubenumEventLogPermissionAccess

Defines access levels used by EventLog permission classes.

System_CAPS_pubenumOverflowAction

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

System_CAPS_pubenumPerformanceCounterCategoryType

Indicates whether the performance counter category can have multiple instances.

System_CAPS_pubenumPerformanceCounterInstanceLifetime

Specifies the lifetime of a performance counter instance.

System_CAPS_pubenumPerformanceCounterPermissionAccess

Defines access levels used by PerformanceCounter permission classes.

System_CAPS_pubenumPerformanceCounterType

Specifies the formula used to calculate the NextValue method for a PerformanceCounter instance.

System_CAPS_pubenumPresentationTraceLevel

Describes the level of detail to trace about a particular object.

System_CAPS_pubenumProcessPriorityClass

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.

System_CAPS_pubenumProcessWindowStyle

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

System_CAPS_pubenumSourceLevels

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

System_CAPS_pubenumThreadPriorityLevel

Specifies the priority level of a thread.

System_CAPS_pubenumThreadState

Specifies the current execution state of the thread.

System_CAPS_pubenumThreadWaitReason

Specifies the reason a thread is waiting.

System_CAPS_pubenumTraceEventType

Identifies the type of event that has caused the trace.

System_CAPS_pubenumTraceLevel

Specifies what messages to output for the Debug, Trace and TraceSwitch classes.

System_CAPS_pubenumTraceLogRetentionOption

Specifies the file structure that will be used for the EventSchemaTraceListener log.

System_CAPS_pubenumTraceOptions

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

  • The EventLog component provides functionality to write to event logs, read event log entries, and create and delete event logs and event sources on the network. The EntryWrittenEventHandler provides a way to interact with event logs asynchronously. Supporting classes provide access to more detailed control, including: permission restrictions, the ability to specify event log types (which controls the type of default data that is written with an event log entry), and iterate through collections of event log entries. For more information about these tasks, see the EventLogPermission, EventLogEntryType, and EventLogEntryCollection classes.

  • The Process class provides functionality to monitor system processes across the network, and to start and stop local system processes. In addition to retrieving lists of running processes (by specifying either the computer, the process name, or the process id) or viewing information about the process that currently has access to the processor, you can get detailed knowledge of process threads and modules both through the Process class itself, and by interacting with the ProcessThread and ProcessModule classes. The ProcessStartInfo class enables you to specify a variety of elements with which to start a new process, such as input, output, and error streams, working directories, and command line verbs and arguments. These give you fine control over the behavior of your processes. Other related classes let you specify window styles, process and thread priorities, and interact with collections of threads and modules.

  • The PerformanceCounter class enables you to monitor system performance, while the PerformanceCounterCategory class provides a way to create new custom counters and categories. You can write to local custom counters and read from both local and remote counters (system as well as custom). You can sample counters using the PerformanceCounter class, and calculate results from successive performance counter samples using the CounterSample class. The CounterCreationData class enables you to create multiple counters in a category and specify their types. Other classes associated with the performance counter component provide access to collections of counters, counter permission, and counter types.

The System.Diagnostics namespace also provides classes that allow you to debug your application and to trace the execution of your code. For more information, see the Trace and Debug classes.

Return to top
Show:
© 2016 Microsoft