RuleSettings 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
RuleSettings 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| RuleSettings(String, String, String) |
기본 설정을 사용하여 클래스의 새 인스턴스를 RuleSettings 초기화합니다. 그러나 이름, 이벤트 이름 및 공급자가 지정됩니다. |
| RuleSettings(String, String, String, String, Int32, Int32, TimeSpan) |
클래스의 RuleSettings 값을 제외한 모든 값이 지정된 클래스의 새 인스턴스를 Custom 초기화합니다. |
| RuleSettings(String, String, String, String, Int32, Int32, TimeSpan, String) |
모든 값이 지정된 클래스의 BufferModeSettings 새 인스턴스를 초기화합니다. |
RuleSettings(String, String, String)
기본 설정을 사용하여 클래스의 새 인스턴스를 RuleSettings 초기화합니다. 그러나 이름, 이벤트 이름 및 공급자가 지정됩니다.
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)
매개 변수
- name
- String
만들 개체의 RuleSettings 이름입니다.
- eventName
- String
이 규칙이 적용되는 개체의 EventMappingSettings 이름입니다.
- provider
- String
이 규칙이 적용되는 개체의 ProviderSettings 이름입니다.
예제
다음 코드 예제에서는 생성자를 사용 RuleSettings 하는 방법을 보여 있습니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 HealthMonitoringSection 일부입니다.
// 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"))
설명
다음 표에서는 이 생성자에 사용되는 기본 설정을 보여줍니다.
| 재산 | 기본값 |
|---|---|
| Custom | 빈 문자열("")입니다. |
| MaxLimit | MaxValue; |
| MinInstances | 1. |
| MinInterval | 0 틱. |
| Profile | 빈 문자열("")입니다. |
추가 정보
적용 대상
RuleSettings(String, String, String, String, Int32, Int32, TimeSpan)
클래스의 RuleSettings 값을 제외한 모든 값이 지정된 클래스의 새 인스턴스를 Custom 초기화합니다.
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)
매개 변수
- name
- String
만들 개체의 RuleSettings 이름입니다.
- eventName
- String
이 규칙이 적용되는 개체의 EventMappingSettings 이름입니다.
- provider
- String
이 규칙이 적용되는 개체의 ProviderSettings 이름입니다.
- profile
- String
이 규칙이 적용되는 개체의 ProfileSettings 이름입니다.
- minInstances
- Int32
이벤트가 공급자에게 발생하기 전에 발생할 수 있는 동일한 유형의 이벤트 발생 횟수입니다.
- maxLimit
- Int32
동일한 형식의 이벤트가 발생할 수 있는 최대 횟수입니다.
- minInterval
- TimeSpan
동일한 형식의 두 이벤트 사이의 최소 시간 간격입니다.
예제
다음 코드 예제에서는 생성자를 사용 RuleSettings 하는 방법을 보여 있습니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 HealthMonitoringSection 일부입니다.
// 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)))
설명
다음 표에서는 이 생성자에 사용되는 기본 설정을 보여줍니다.
| 재산 | 기본값 |
|---|---|
| Custom | 빈 문자열("")입니다. |
추가 정보
적용 대상
RuleSettings(String, String, String, String, Int32, Int32, TimeSpan, String)
모든 값이 지정된 클래스의 BufferModeSettings 새 인스턴스를 초기화합니다.
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)
매개 변수
- name
- String
만들 개체의 RuleSettings 이름입니다.
- eventName
- String
이 규칙이 적용되는 개체의 EventMappingSettings 이름입니다.
- provider
- String
이 규칙이 적용되는 개체의 ProviderSettings 이름입니다.
- profile
- String
이 규칙이 적용되는 개체의 ProfileSettings 이름입니다.
- minInstances
- Int32
공급자에게 이벤트가 발생하기 전에 동일한 형식의 이벤트의 최소 발생 횟수입니다.
- maxLimit
- Int32
동일한 형식의 이벤트가 발생하는 최대 횟수입니다.
- minInterval
- TimeSpan
동일한 형식의 두 이벤트 사이의 최소 시간 간격입니다.
- custom
- String
를 구현하는 사용자 지정 클래스의 정규화된 형식입니다 IWebEventCustomEvaluator.
예제
다음 코드 예제에서는 생성자를 사용 RuleSettings 하는 방법을 보여 있습니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 HealthMonitoringSection 일부입니다.
// 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"))
설명
이 생성자에 대한 모든 설정을 제공해야 합니다.