System.Diagnostics Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides classes that allow you to interact with system processes, event logs, and performance counters.
Activity |
Represents an operation with context to be used for logging. |
Activity |
Allows listening to the start and stop activity events and gives the opportunity to decide creating an activity for sampling scenarios. |
Activity |
Provides APIs to create and start Activity objects and to register ActivityListener objects to listen to the Activity events. |
Activity |
ActivityTagsCollection is a collection class used to store tracing tags. This collection will be used with classes like ActivityEvent and ActivityLink. This collection behaves as follows:
|
Boolean |
Provides a simple on/off switch that controls debugging and tracing output. |
Conditional |
Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined. |
Console |
Directs tracing or debugging output to either the standard output or the standard error stream. |
Correlation |
Correlates traces that are part of a logical transaction. |
Counter |
Defines the counter type, name, and Help string for a custom counter. |
Counter |
Provides a strongly typed collection of CounterCreationData objects. |
Counter |
Provides a set of utility functions for interpreting performance counter data. |
Data |
Provides data for the OutputDataReceived and ErrorDataReceived events. |
Debug |
Provides a set of methods and properties that help debug your code. |
Debuggable |
Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited. |
Debugger |
Enables communication with a debugger. This class cannot be inherited. |
Debugger |
Determines if and how a member is displayed in the debugger variable windows. This class cannot be inherited. |
Debugger |
If a .NET Debugger is attached that supports the BreakForUserUnhandledException(Exception) API, the debugger won't break on user-unhandled exceptions when the exception is caught by a method with this attribute, unless BreakForUserUnhandledException(Exception) is called. |
Debugger |
Determines how a class or field is displayed in the debugger variable windows. |
Debugger |
Specifies the DebuggerHiddenAttribute. This class cannot be inherited. |
Debugger |
Identifies a type or member that is not part of the user code for an application. |
Debugger |
Indicates the code following the attribute is to be executed in run, not step, mode. |
Debugger |
Instructs the debugger to step through the code instead of stepping into the code. This class cannot be inherited. |
Debugger |
Specifies the display proxy for a type. |
Debugger |
Specifies that the type has a visualizer. This class cannot be inherited. |
Default |
Provides the default output methods and behavior for tracing. |
Delimited |
Directs tracing or debugging output to a text writer, such as a stream writer, or to a stream, such as a file stream. |
Diagnostic |
Provides an implementation of the abstract DiagnosticSource class that represents a named place to which a source sends its information (events). |
Diagnostic |
|
Diagnostic |
Represents diagnostic information about a method. Information provided by this class is similar to information provided by MethodBase but it's meant for logging and tracing purposes. |
Diagnostics |
Handles the diagnostics section of configuration files. |
Diagnostic |
An abstract class that allows code to be instrumented for production-time logging of rich data payloads for consumption within the process that was instrumented. |
Distributed |
An implementation of DistributedContextPropagator determines if and how distributed context information is encoded and decoded as it traverses the network. The encoding can be transported over any network protocol that supports string key-value pairs. For example, when using HTTP, each key-value pair is an HTTP header. DistributedContextPropagator injects values into and extracts values from carriers as string key-value pairs. |
Entry |
Provides data for the EntryWritten event. |
Event |
Represents language-neutral information for an event log entry. |
Event |
Provides interaction with Windows event logs. |
Event |
Encapsulates a single record in the event log. This class cannot be inherited. |
Event |
Defines size and enumerators for a collection of EventLogEntry instances. |
Event |
Allows you to install and configure an event log that your application reads from or writes to when running. |
Event |
Controls code access permissions for event logging. |
Event |
Allows declarative permission checks for event logging. |
Event |
Defines the smallest unit of a code access security permission that is set for an EventLog. |
Event |
Contains a strongly typed collection of EventLogPermissionEntry objects. |
Event |
Provides a simple listener that directs tracing or debugging output to an EventLog. |
Event |
Directs tracing or debugging output of end-to-end events to an XML-encoded, schema-compliant log file. |
Event |
Represents the configuration settings used to create an event log source on the local computer or a remote computer. |
Event |
Indicates whether a listener should trace based on the event type. |
File |
Provides version information for a physical file on disk. |
Initializing |
Provides data for the Switch.Initializing event. |
Initializing |
Provides data for the TraceSource.Initializing event. |
Instance |
Holds instance data associated with a performance counter sample. |
Instance |
Provides a strongly typed collection of InstanceData objects. |
Instance |
Provides a strongly typed collection of InstanceDataCollection objects. |
Monitoring |
Specifies a description for a property or event. |
Performance |
Represents a Windows NT performance counter component. |
Performance |
Represents a performance object, which defines a category of performance counters. |
Performance |
Specifies an installer for the PerformanceCounter component. |
Performance |
Prepares performance data for the performance.dll the system loads when working with performance counters. |
Performance |
Allows control of code access permissions for PerformanceCounter. |
Performance |
Allows declarative performance counter permission checks. |
Performance |
Defines the smallest unit of a code access security permission that is set for a PerformanceCounter. |
Performance |
Contains a strongly typed collection of PerformanceCounterPermissionEntry objects. |
Presentation |
Provides debug tracing support that is specifically targeted for Windows Presentation Foundation (WPF) applications. |
Process |
Provides access to local and remote processes and enables you to start and stop local system processes. |
Process |
Represents a .dll or .exe file that is loaded into a particular process. |
Process |
Provides a strongly typed collection of ProcessModule objects. |
Process |
Specifies a set of values that are used when you start a process. |
Process |
Represents an operating system process thread. |
Process |
Provides a strongly typed collection of ProcessThread objects. |
Source |
Indicates whether a listener should trace a message based on the source of a trace. |
Source |
Provides a multilevel switch to control tracing and debug output without recompiling your code. |
Stack |
Provides information about a StackFrame, which represents a function call on the call stack for the current thread. |
Stack |
Provides extension methods for the StackFrame class, which represents a function call on the call stack for the current thread. |
Stack |
Represents a stack trace, which is an ordered collection of one or more stack frames. |
Stack |
Types and Methods attributed with StackTraceHidden will be omitted from the stack trace text shown in StackTrace.ToString() and Exception.StackTrace |
Stopwatch |
Provides a set of methods and properties that you can use to accurately measure elapsed time. |
Switch |
Provides an abstract base class to create new debugging and tracing switches. |
Switch |
Identifies a switch used in an assembly, class, or member. |
Switch |
Identifies the level type for a switch. |
Text |
Directs tracing or debugging output to a TextWriter or to a Stream, such as FileStream. |
Trace |
Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited. |
Trace |
|
Trace |
Provides trace event data specific to a thread and a process. |
Trace |
Provides the base class for trace filter implementations. |
Trace |
Provides the |
Trace |
Provides a thread-safe list of TraceListener objects. |
Trace |
Provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source. |
Trace |
Provides a multilevel switch to control tracing and debug output without recompiling your code. |
Unescaped |
Provides unescaped XML data for the logging of user-provided trace data. |
Unreachable |
The exception that is thrown when the program executes an instruction that was thought to be unreachable. |
Xml |
Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, such as a FileStream. |
Activity. |
Enumerates the data stored on an Activity object. |
Activity |
Provides data for the CurrentChanged event. |
Activity |
A representation that conforms to the W3C TraceContext specification. It contains two identifiers: a TraceId and a SpanId, along with a set of common TraceFlags and system-specific TraceState values. |
Activity |
Encapsulates all the information that is sent to the activity listener, to make decisions about the creation of the activity instance, as well as its state. The possible generic type parameters are ActivityContext or String. |
Activity |
Represents an event containing a name and a timestamp, as well as an optional list of tags. |
Activity |
Activities may be linked to zero or more activity context instances that are causally related. Activity links can point to activity contexts inside a single trace or across different traces. Activity links can be used to represent batched operations where an activity was initiated by multiple initiating activities, each representing a single incoming item being processed in the batch. |
Activity |
Represents a SpanId formatted based on a W3C standard. |
Activity |
Enumerates the elements of an |
Activity |
Represents a TraceId whose format is based on a W3C standard. |
Counter |
Defines a structure that holds the raw data for a performance counter. |
Debug. |
Provides an interpolated string handler for Assert(Boolean) that only performs formatting if the assert fails. |
Debug. |
Provides an interpolated string handler for WriteIf(Boolean, String) and WriteLineIf(Boolean, Object) that only performs formatting if the condition applies. |
Tag |
Represents a list of tags that can be accessed by index. Provides methods to search, sort, and manipulate lists. |
Tag |
An enumerator for traversing a tag list collection. |
ICollect |
Prepares performance data for the performance DLL the system loads when working with performance counters. |
Activity |
Specifies the format of the Id property. |
Activity |
Describes the relationship between the activity, its parents and its children in a trace. |
Activity |
Enumeration values used by ActivityListener to indicate the amount of data to collect for the related Activity. Requesting more data causes a greater performance overhead. |
Activity |
Define the status code of the Activity which indicate the status of the instrumented operation. |
Activity |
Specifies flags defined by the W3C standard that are associated with an activity. |
Debuggable |
Specifies the debugging mode for the just-in-time (JIT) compiler. |
Debugger |
Provides display instructions for the debugger. |
Event |
Specifies the event type of an event log entry. |
Event |
Defines access levels used by EventLog permission classes. |
Overflow |
Specifies how to handle entries in an event log that has reached its maximum file size. |
Performance |
Indicates whether the performance counter category can have multiple instances. |
Performance |
Specifies the lifetime of a performance counter instance. |
Performance |
Defines access levels used by PerformanceCounter permission classes. |
Performance |
Specifies performance counter types that map directly to native types. |
Presentation |
Describes the level of detail to trace about a particular object. |
Process |
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. |
Process |
Specified how a new window should appear when the system starts a process. |
Source |
Specifies the levels of trace messages filtered by the source switch and event type filter. |
Thread |
Specifies the priority level of a thread. |
Thread |
Specifies the current execution state of the thread. |
Thread |
Specifies the reason a thread is waiting. |
Trace |
Identifies the type of event that has caused the trace. |
Trace |
Specifies what messages to output for the Debug, Trace and TraceSwitch classes. |
Trace |
Specifies the file structure that will be used for the EventSchemaTraceListener log. |
Trace |
Specifies trace data options to be written to the trace output. |
Data |
Represents the method that will handle the OutputDataReceived event or ErrorDataReceived event of a Process. |
Distributed |
Represents the callback method that's used in the extract methods of propagators. The callback is invoked to look up the value of a named field. |
Distributed |
Represents the callback method that's used in propagators' inject methods. This callback is invoked to set the value of a named field. Propagators may invoke it multiple times in order to set multiple fields. |
Entry |
Represents the method that will handle the EntryWritten event of an EventLog. |
Exception |
|
Sample |
A delegate that defines the signature of the ActivityListener callbacks used in the sampling process. |
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.
.NET feedback
.NET er et åben kildekode projekt. Vælg et link for at give feedback: