RuleSettings コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
RuleSettings クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| 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
同じ種類の 2 つのイベント間の最小時間間隔。
例
次のコード例は、 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
同じ種類の 2 つのイベント間の最小時間間隔。
- 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"))
注釈
このコンストラクターのすべての設定を指定する必要があります。