EventMappingSettings Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy EventMappingSettings.

Przeciążenia

EventMappingSettings(String, String)

Inicjuje EventMappingSettings nowe wystąpienie klasy przy użyciu określonej nazwy i typu.

EventMappingSettings(String, String, Int32, Int32)

Inicjuje BufferModeSettings nowe wystąpienie klasy przy użyciu określonych wartości.

EventMappingSettings(String, String)

Inicjuje EventMappingSettings nowe wystąpienie klasy przy użyciu określonej nazwy i typu.

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)

Parametry

name
String

Nazwa tworzonego EventMappingSettings obiektu.

type
String

W pełni kwalifikowany typ klasy zdarzeń do użycia.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać konstruktora EventMappingSettings . Ten przykład kodu jest częścią większego przykładu podanego HealthMonitoringSection dla klasy.

// 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"))

Uwagi

W poniższej tabeli przedstawiono ustawienia domyślne używane dla tego konstruktora.

Ustawienie Wartość domyślna
StartEventCode 0.
EndEventCode MaxValue.

Zobacz też

Dotyczy

EventMappingSettings(String, String, Int32, Int32)

Inicjuje BufferModeSettings nowe wystąpienie klasy przy użyciu określonych wartości.

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)

Parametry

name
String

Nazwa tworzonego EventMappingSettings obiektu.

type
String

W pełni kwalifikowany typ klasy zdarzeń do użycia.

startEventCode
Int32

Zakres kodu zdarzenia początkowego.

endEventCode
Int32

Końcowy zakres kodu zdarzeń.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać konstruktora EventMappingSettings . Ten przykład kodu jest częścią większego przykładu podanego HealthMonitoringSection dla klasy.

// 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))

Zobacz też

Dotyczy