다음을 통해 공유


RuleSettings.MinInstances 속성

정의

이벤트가 공급자에게 발생하기 전에 동일한 유형의 이벤트가 발생하는 최소 수를 가져오거나 설정합니다.

public:
 property int MinInstances { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("minInstances", DefaultValue=1)]
[System.Configuration.IntegerValidator(MinValue=1)]
public int MinInstances { get; set; }
[<System.Configuration.ConfigurationProperty("minInstances", DefaultValue=1)>]
[<System.Configuration.IntegerValidator(MinValue=1)>]
member this.MinInstances : int with get, set
Public Property MinInstances As Integer

속성 값

이벤트가 공급자에게 발생하기 전에 동일한 유형의 이벤트가 발생한 최소 횟수입니다. 기본값은 1입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 MinInstances . 이 코드 예제는 클래스에 제공된 더 큰 예제의 HealthMonitoringSection 일부입니다.

ruleSetting.MinInstances = 1;
ruleSetting.MinInstances = 1

설명

이 속성의 값은 0보다 커야 합니다. 잘못된 값으로 인해 구성 섹션이 저장될 때 예외가 throw될 수 있습니다.

이는 이벤트가 공급자에게 발생하기 전에 이벤트가 발생하는 최소 횟수를 나타냅니다. 예를 들어 반환 값이 5면 ASP.NET 이벤트의 다섯 번째 인스턴스가 발생할 때까지 공급자에게 이벤트를 발생시키지 않습니다.

적용 대상

추가 정보