RuleSettings.MinInterval Propriedade
Definição
Obtém ou define o intervalo de tempo mínimo entre dois eventos do mesmo tipo.Gets or sets the minimum time interval between two events of the same type.
public:
property TimeSpan MinInterval { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]
[System.Configuration.ConfigurationProperty("minInterval", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public TimeSpan MinInterval { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))>]
[<System.Configuration.ConfigurationProperty("minInterval", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.MinInterval : TimeSpan with get, set
Public Property MinInterval As TimeSpan
Valor da propriedade
O intervalo de tempo mínimo entre dois eventos do mesmo tipo.The minimum time interval between two events of the same type. O valor padrão é 0 tiques.The default value is 0 ticks.
- Atributos
Exemplos
O exemplo de código a seguir mostra como usar a MinInterval propriedade.The following code example shows how to use the MinInterval property. Este exemplo de código faz parte de um exemplo maior fornecido para a HealthMonitoringSection classe.This code example is part of a larger example provided for the HealthMonitoringSection class.
ruleSetting.MinInterval = TimeSpan.Parse("00:00:30");
ruleSetting.MinInterval = TimeSpan.Parse("00:00:30")
Comentários
O valor pode ser tornado infinito definindo-o como MaxValue .The value can be made infinite by setting it to MaxValue. Valores inválidos podem causar a geração de uma exceção quando a seção de configuração é salva.Invalid values may cause an exception to be thrown when the configuration section is saved.
Se o valor for zero, não haverá um intervalo mínimo.If the value is zero, then there is no minimum interval.