RuleSettings Construtores

Definição

Inicializa uma nova instância da classe RuleSettings.

Sobrecargas

Nome Description
RuleSettings(String, String, String)

Inicializa uma nova instância da classe usando configurações RuleSettings padrão; no entanto, o nome, o nome do evento e o provedor são especificados.

RuleSettings(String, String, String, String, Int32, Int32, TimeSpan)

Inicializa uma nova instância da RuleSettings classe em que todos os valores, exceto os Custom da classe, são especificados.

RuleSettings(String, String, String, String, Int32, Int32, TimeSpan, String)

Inicializa uma nova instância da BufferModeSettings classe em que todos os valores são especificados.

RuleSettings(String, String, String)

Inicializa uma nova instância da classe usando configurações RuleSettings padrão; no entanto, o nome, o nome do evento e o provedor são especificados.

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

Parâmetros

name
String

O nome do objeto a RuleSettings ser criado.

eventName
String

O nome do objeto ao EventMappingSettings qual essa regra se aplica.

provider
String

O nome do objeto ao ProviderSettings qual essa regra se aplica.

Exemplos

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

// Add a RuleSettings object to the Rules collection property.
healthMonitoringSection.Rules.Add(new RuleSettings("All Errors Default", 
    "All Errors", "EventLogProvider"));
' Add a RuleSettings object to the Rules collection property.
healthMonitoringSection.Rules.Add(new RuleSettings("All Errors Default", _
    "All Errors", "EventLogProvider"))

Comentários

A tabela a seguir mostra as configurações padrão usadas para esse construtor.

Property Valor padrão
Custom Uma cadeia de caracteres vazia ("").
MaxLimit MaxValue.
MinInstances 1.
MinInterval 0 tiques.
Profile Uma cadeia de caracteres vazia ("").

Confira também

Aplica-se a

RuleSettings(String, String, String, String, Int32, Int32, TimeSpan)

Inicializa uma nova instância da RuleSettings classe em que todos os valores, exceto os Custom da classe, são especificados.

public:
 RuleSettings(System::String ^ name, System::String ^ eventName, System::String ^ provider, System::String ^ profile, int minInstances, int maxLimit, TimeSpan minInterval);
public RuleSettings(string name, string eventName, string provider, string profile, int minInstances, int maxLimit, TimeSpan minInterval);
new System.Web.Configuration.RuleSettings : string * string * string * string * int * int * TimeSpan -> System.Web.Configuration.RuleSettings
Public Sub New (name As String, eventName As String, provider As String, profile As String, minInstances As Integer, maxLimit As Integer, minInterval As TimeSpan)

Parâmetros

name
String

O nome do objeto a RuleSettings ser criado.

eventName
String

O nome do objeto ao EventMappingSettings qual essa regra se aplica.

provider
String

O nome do objeto ao ProviderSettings qual essa regra se aplica.

profile
String

O nome do objeto ao ProfileSettings qual essa regra se aplica.

minInstances
Int32

O número mínimo de ocorrências do mesmo tipo de evento que pode ocorrer antes que o evento seja gerado para o provedor.

maxLimit
Int32

O número máximo de vezes que eventos do mesmo tipo podem ser gerados.

minInterval
TimeSpan

O intervalo de tempo mínimo entre dois eventos do mesmo tipo.

Exemplos

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

// Add a RuleSettings object to the Rules collection property.
healthMonitoringSection.Rules.Add(new RuleSettings("Failure Audits Default",
    "Failure Audits", "EventLogProvider", "Default", 1, Int32.MaxValue,
    new TimeSpan(0, 1, 0)));
' Add a RuleSettings object to the Rules collection property.
healthMonitoringSection.Rules.Add(new RuleSettings("Failure Audits Default", _
    "Failure Audits", "EventLogProvider", "Default", 1, Int32.MaxValue, _
    new TimeSpan(0, 1, 0)))

Comentários

A tabela a seguir mostra as configurações padrão usadas para esse construtor.

Property Valor padrão
Custom Uma cadeia de caracteres vazia ("").

Confira também

Aplica-se a

RuleSettings(String, String, String, String, Int32, Int32, TimeSpan, String)

Inicializa uma nova instância da BufferModeSettings classe em que todos os valores são especificados.

public:
 RuleSettings(System::String ^ name, System::String ^ eventName, System::String ^ provider, System::String ^ profile, int minInstances, int maxLimit, TimeSpan minInterval, System::String ^ custom);
public RuleSettings(string name, string eventName, string provider, string profile, int minInstances, int maxLimit, TimeSpan minInterval, string custom);
new System.Web.Configuration.RuleSettings : string * string * string * string * int * int * TimeSpan * string -> System.Web.Configuration.RuleSettings
Public Sub New (name As String, eventName As String, provider As String, profile As String, minInstances As Integer, maxLimit As Integer, minInterval As TimeSpan, custom As String)

Parâmetros

name
String

O nome do objeto a RuleSettings ser criado.

eventName
String

O nome do objeto ao EventMappingSettings qual essa regra se aplica.

provider
String

O nome do objeto ao ProviderSettings qual essa regra se aplica.

profile
String

O nome do objeto ao ProfileSettings qual essa regra se aplica.

minInstances
Int32

O número mínimo de ocorrências de um evento do mesmo tipo antes de o evento ser disparado para o provedor.

maxLimit
Int32

O número máximo de vezes que eventos do mesmo tipo são acionados.

minInterval
TimeSpan

O intervalo de tempo mínimo entre dois eventos do mesmo tipo.

custom
String

O tipo totalmente qualificado de uma classe personalizada que implementa IWebEventCustomEvaluator.

Exemplos

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

// Add a RuleSettings object to the Rules collection property.
healthMonitoringSection.Rules.Add(new RuleSettings("Failure Audits Custom",
    "Failure Audits", "EventLogProvider", "Custom", 1, Int32.MaxValue,
    new TimeSpan(0, 1, 0), "MyEvaluators.MyCustomeEvaluator2, MyCustom.dll"));
' Add a RuleSettings object to the Rules collection property.
healthMonitoringSection.Rules.Add(new RuleSettings("Failure Audits Custom", _
    "Failure Audits", "EventLogProvider", "Custom", 1, Int32.MaxValue, _
    new TimeSpan(0, 1, 0), "MyEvaluators.MyCustomeEvaluator2, MyCustom.dll"))

Comentários

Você deve fornecer todas as configurações para este construtor.

Confira também

Aplica-se a