EventMappingSettings Construtores

Definição

Inicializa uma nova instância da EventMappingSettings classe.

Sobrecargas

Name Description
EventMappingSettings(String, String)

Inicializa uma nova instância da EventMappingSettings classe usando o nome e tipo especificados.

EventMappingSettings(String, String, Int32, Int32)

Inicializa uma nova instância da BufferModeSettings classe usando os valores especificados.

EventMappingSettings(String, String)

Inicializa uma nova instância da EventMappingSettings classe usando o nome e tipo especificados.

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)

Parâmetros

name
String

O nome do EventMappingSettings objeto que está a ser criado.

type
String

O tipo totalmente qualificado da classe do evento a utilizar.

Exemplos

O exemplo de código seguinte mostra como usar o EventMappingSettings construtor. Este exemplo de código faz parte de um exemplo maior fornecido para a HealthMonitoringSection classe.

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

Observações

A tabela seguinte mostra as definições predefinidas usadas para este construtor.

Definição Valor padrão
StartEventCode 0.
EndEventCode MaxValue.

Ver também

Aplica-se a

EventMappingSettings(String, String, Int32, Int32)

Inicializa uma nova instância da BufferModeSettings classe usando os valores especificados.

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)

Parâmetros

name
String

O nome do EventMappingSettings objeto que está a ser criado.

type
String

O tipo totalmente qualificado da classe do evento a utilizar.

startEventCode
Int32

O intervalo de códigos do evento inicial.

endEventCode
Int32

O intervalo de códigos do evento final.

Exemplos

O exemplo de código seguinte mostra como usar o EventMappingSettings construtor. Este exemplo de código faz parte de um exemplo maior fornecido para a HealthMonitoringSection classe.

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

Ver também

Aplica-se a