mscorlib 4.0.0.0 System.Object System.IDisposable

This class is intended to be inherited by a user class that provides specific events to be used for ETW. The methods are called to log the events.

The basic functionality of is sufficient for most applications. If you want more control over the ETW manifest that is created, you can apply the attribute to the methods. For advanced event source applications, it is possible to intercept the commands being sent to the derived event source and change the filtering, or to cause actions (such as dumping a data structure) to be performed by the inheritor. An event source can be activated with Windows ETW controllers, such as the Logman tool, immediately. It is also possible to programmatically control and intercept the data dispatcher. The class provides additional functionality.

Provides the ability to create events for event tracing for Windows (ETW).

- Constructor
  4.0.0.0
  To be added.

  Creates a new instance of the class.

- Constructor
  4.0.0.0
  To be added.

  Creates a new instance of the class and specifies whether to throw an exception when an error occurs in the underlying Windows code.

  true to throw an exception when an error occurs in the underlying Windows code; otherwise, false.
- Method
  4.0.0.0
  System.Void

  Call Dispose when you are finished using the . The Dispose method leaves the in an unusable state. After calling Dispose, you must release all references to the so the garbage collector can reclaim the memory that the was occupying.

  For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Always call Dispose before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method.

  Releases all resources used by the current instance of the class.

- Method
  4.0.0.0
  System.Void ``

  This method is called by the public Dispose() method and the Finalize method. Dispose() invokes the protected Dispose(Boolean) method with the parameter set to true. Finalize invokes Dispose with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose() method of each referenced object.

  Releases the unmanaged resources used by the class and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Method
  4.0.0.0
  System.Boolean To be added.

  Determines whether the current event source is enabled.

  true if the current event source is enabled; otherwise, false.

- Method
  4.0.0.0
  System.Void `` `` `` ``

  should be greater than 0 or less than 65535 or errors can occur in the operation. If errors do occur, you can get more information about the source of the error by checking the output stream of the debugger, if you have a debugger attached to the process firing events. You can also look for errors reported in the ETW event stream, if you have an ETW listener on the event source where the error occurs.

  When you implement a method that is identified as an ETW event in an -derived class. You must call the base class method passing the and the same arguments as the implemented method similar to the following example.

  `[Event(2, Level = EventLevel.Informational)] public void Info1(string arg1) { base.WriteEvent(2, arg1); }`

  Writes an event by using the provided event identifier and 32-bit integer arguments.

  The event identifier. This value should be between 0 and 65535. An integer argument. An integer argument. An integer argument.