Share via


RuleSettings.EventName 屬性

定義

取得或設定適用這項規則之 EventMappingSettings 物件的名稱。

public:
 property System::String ^ EventName { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("eventName", DefaultValue="", IsRequired=true)]
public string EventName { get; set; }
[<System.Configuration.ConfigurationProperty("eventName", DefaultValue="", IsRequired=true)>]
member this.EventName : string with get, set
Public Property EventName As String

屬性值

String

適用這項規則的 EventMappingSettings 物件名稱。

屬性

範例

下列程式碼範例示範如何使用 EventName 屬性。 此程式碼範例是提供給 類別之較大範例的 HealthMonitoringSection 一部分。

ruleSetting.EventName = "All Errors";
ruleSetting.EventName = "All Errors"

備註

EventMappingSettings這個屬性所參考的物件必須包含在同時包含這個的相同 HealthMonitoringSection 物件RuleSettings

物件。

適用於

另請參閱