Bewerken

Delen via


EventMappingSettings Constructors

Definition

Initializes a new instance of the EventMappingSettings class.

Overloads

EventMappingSettings(String, String)

Initializes a new instance of the EventMappingSettings class using the specified name and type.

EventMappingSettings(String, String, Int32, Int32)

Initializes a new instance of the BufferModeSettings class using the specified values.

EventMappingSettings(String, String)

Initializes a new instance of the EventMappingSettings class using the specified name and type.

public:
 EventMappingSettings(System::String ^ name, System::String ^ type);
public EventMappingSettings (string name, string type);
new System.Web.Configuration.EventMappingSettings : string * string -> System.Web.Configuration.EventMappingSettings
Public Sub New (name As String, type As String)

Parameters

name
String

The name of the EventMappingSettings object being created.

type
String

The fully qualified type of the event class to use.

Examples

The following code example shows how to use the EventMappingSettings constructor. This code example is part of a larger example provided for the HealthMonitoringSection class.

// Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings(
    "Failure Audits", "System.Web.Management.WebAuditEvent, System.Web"));
' Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings( _
    "Failure Audits", "System.Web.Management.WebAuditEvent, System.Web"))

Remarks

The following table shows the default settings that are used for this constructor.

Setting Default Value
StartEventCode 0.
EndEventCode MaxValue.

See also

Applies to

EventMappingSettings(String, String, Int32, Int32)

Initializes a new instance of the BufferModeSettings class using the specified values.

public:
 EventMappingSettings(System::String ^ name, System::String ^ type, int startEventCode, int endEventCode);
public EventMappingSettings (string name, string type, int startEventCode, int endEventCode);
new System.Web.Configuration.EventMappingSettings : string * string * int * int -> System.Web.Configuration.EventMappingSettings
Public Sub New (name As String, type As String, startEventCode As Integer, endEventCode As Integer)

Parameters

name
String

The name of the EventMappingSettings object being created.

type
String

The fully qualified type of the event class to use.

startEventCode
Int32

The starting event code range.

endEventCode
Int32

The ending event code range.

Examples

The following code example shows how to use the EventMappingSettings constructor. This code example is part of a larger example provided for the HealthMonitoringSection class.

// Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings(
    "Success Audits", "System.Web.Management.WebAuditEvent, System.Web",
    512, Int32.MaxValue));
' Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings( _
    "Success Audits", "System.Web.Management.WebAuditEvent, System.Web", _
    512, Int32.MaxValue))

See also

Applies to