RuleSettings Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da RuleSettings classe.
Sobrecargas
| Name | Description |
|---|---|
| RuleSettings(String, String, String) |
Inicializa uma nova instância da RuleSettings classe usando as definições padrão; no entanto, o nome, o nome do evento e o fornecedor são especificados. |
| RuleSettings(String, String, String, String, Int32, Int32, TimeSpan) |
Inicializa uma nova instância da RuleSettings classe onde todos os valores, exceto os da Custom classe, são especificados. |
| RuleSettings(String, String, String, String, Int32, Int32, TimeSpan, String) |
Inicializa uma nova instância da BufferModeSettings classe onde todos os valores são especificados. |
RuleSettings(String, String, String)
Inicializa uma nova instância da RuleSettings classe usando as definições padrão; no entanto, o nome, o nome do evento e o fornecedor 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 RuleSettings objeto a criar.
- eventName
- String
O nome do EventMappingSettings objeto a que esta regra se aplica.
- provider
- String
O nome do ProviderSettings objeto a que esta regra se aplica.
Exemplos
O exemplo de código seguinte 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"))
Observações
A tabela seguinte mostra as definições predefinidas usadas para este construtor.
| Property | Valor predefinido |
|---|---|
| Custom | Uma corda vazia (""). |
| MaxLimit | MaxValue. |
| MinInstances | 1. |
| MinInterval | 0 tiques. |
| Profile | Uma corda vazia (""). |
Ver também
Aplica-se a
RuleSettings(String, String, String, String, Int32, Int32, TimeSpan)
Inicializa uma nova instância da RuleSettings classe onde todos os valores, exceto os da Custom 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 RuleSettings objeto a criar.
- eventName
- String
O nome do EventMappingSettings objeto a que esta regra se aplica.
- provider
- String
O nome do ProviderSettings objeto a que esta regra se aplica.
- profile
- String
O nome do ProfileSettings objeto a que esta regra se aplica.
- minInstances
- Int32
O número mínimo de ocorrências do mesmo tipo de evento que podem ocorrer antes de o evento ser apresentado ao fornecedor.
- maxLimit
- Int32
O número máximo de vezes que eventos do mesmo tipo podem ser levantados.
- minInterval
- TimeSpan
O intervalo mínimo de tempo entre dois eventos do mesmo tipo.
Exemplos
O exemplo de código seguinte 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)))
Observações
A tabela seguinte mostra as definições predefinidas usadas para este construtor.
| Property | Valor predefinido |
|---|---|
| Custom | Uma corda vazia (""). |
Ver também
Aplica-se a
RuleSettings(String, String, String, String, Int32, Int32, TimeSpan, String)
Inicializa uma nova instância da BufferModeSettings classe onde 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 RuleSettings objeto a criar.
- eventName
- String
O nome do EventMappingSettings objeto a que esta regra se aplica.
- provider
- String
O nome do ProviderSettings objeto a que esta regra se aplica.
- profile
- String
O nome do ProfileSettings objeto a que esta regra se aplica.
- minInstances
- Int32
O número mínimo de ocorrências de um evento do mesmo tipo antes de o evento ser enviado ao fornecedor.
- maxLimit
- Int32
O número máximo de vezes que eventos do mesmo tipo são disparados.
- minInterval
- TimeSpan
O intervalo mínimo de tempo 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 seguinte 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"))
Observações
Deve fornecer todas as definições para este construtor.