EventSource Constructor (String^, EventSourceSettings)

.NET Framework (current version)
 

Creates a new instance of the EventSource class with the specified name and settings.

Namespace:   System.Diagnostics.Tracing
Assembly:  mscorlib (in mscorlib.dll)

public:
EventSource(
	String^ eventSourceName,
	EventSourceSettings config
)

Parameters

eventSourceName
Type: System::String^

The name to apply to the event source. Must not be null.

config
Type: System.Diagnostics.Tracing::EventSourceSettings

A bitwise combination of the enumeration values that specify the configuration settings to apply to the event source.

Exception Condition
ArgumentNullException

eventSourceName is null.

ArgumentNullException

eventSourceName is null.

Specifying settings when the EventSource is constructed enables you to specify whether the event is written in a manifest-based or a self-describing format. In addition, you can specify that an exception should be raised when an error occurs during the event-writing process.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.6
Return to top
Show: