EventMappingSettingsCollection クラス

定義

EventMappingSettings オブジェクトのコレクションを提供します。 このクラスは継承できません。

public ref class EventMappingSettingsCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.EventMappingSettings))]
public sealed class EventMappingSettingsCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.EventMappingSettings))>]
type EventMappingSettingsCollection = class
    inherit ConfigurationElementCollection
Public NotInheritable Class EventMappingSettingsCollection
Inherits ConfigurationElementCollection
継承
属性

次のコード例は、 型の使用方法を EventMappingSettingsCollection 示しています。 このコード例は、HealthMonitoringSection クラスのために提供されている大規模な例の一部です。


// Add a EventMappingsSettings object to the EventMappings collection property.
EventMappingSettings eventMappingSetting = new EventMappingSettings(
    "Failure Audits", "System.Web.Management.WebAuditEvent, System.Web");
eventMappingSetting.Name = "All Errors";
eventMappingSetting.Type = 
    "System.Web.Management.WebErrorEvent, System.Web";
eventMappingSetting.StartEventCode = 0;
eventMappingSetting.EndEventCode = 4096;
healthMonitoringSection.EventMappings.Add(eventMappingSetting);

// Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings(
    "Failure Audits", "System.Web.Management.WebAuditEvent, System.Web"));

// Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings(
    "Success Audits", "System.Web.Management.WebAuditEvent, System.Web",
    512, Int32.MaxValue));

// Insert an EventMappingsSettings object into the EventMappings collection property.
healthMonitoringSection.EventMappings.Insert(1, 
    new EventMappingSettings("HeartBeats", "", 1, 2));

// Display contents of the EventMappings collection property
Console.WriteLine(
    "EventMappings Collection contains {0} values:", healthMonitoringSection.EventMappings.Count);

// Display all elements.
for (System.Int32 i = 0; i < healthMonitoringSection.EventMappings.Count; i++)
{
eventMappingSetting = healthMonitoringSection.EventMappings[i];
string name = eventMappingSetting.Name;
string type = eventMappingSetting.Type;
int startCd = eventMappingSetting.StartEventCode;
int endCd = eventMappingSetting.EndEventCode;
    string item = "Name='" + name + "', Type='" + type +
        "', StartEventCode =  '" + startCd.ToString() +
        "', EndEventCode =  '" + endCd.ToString() + "'";
    Console.WriteLine("  Item {0}: {1}", i, item);
}

// See if the EventMappings collection property contains the event 'HeartBeats'.
Console.WriteLine("EventMappings contains 'HeartBeats': {0}.",
    healthMonitoringSection.EventMappings.Contains("HeartBeats"));

// Get the index of the 'HeartBeats' event in the EventMappings collection property.
Console.WriteLine("EventMappings index for 'HeartBeats': {0}.",
    healthMonitoringSection.EventMappings.IndexOf("HeartBeats"));

// Get a named EventMappings
eventMappingSetting = healthMonitoringSection.EventMappings["HeartBeats"];

// Remove an EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.Remove("HeartBeats");

// Remove an EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.RemoveAt(0);

// Clear all EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.Clear();

' Add a EventMappingsSettings object to the EventMappings collection property.
Dim eventMappingSetting As EventMappingSettings = New EventMappingSettings( _
    "Failure Audits", "System.Web.Management.WebAuditEvent, System.Web")
eventMappingSetting.Name = "All Errors"
eventMappingSetting.Type = _
    "System.Web.Management.WebErrorEvent, System.Web"
eventMappingSetting.StartEventCode = 0
eventMappingSetting.EndEventCode = 4096
healthMonitoringSection.EventMappings.Add(eventMappingSetting)

' Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings( _
    "Failure Audits", "System.Web.Management.WebAuditEvent, System.Web"))

' Add an EventMappingsSettings object to the EventMappings collection property.
healthMonitoringSection.EventMappings.Add(new EventMappingSettings( _
    "Success Audits", "System.Web.Management.WebAuditEvent, System.Web", _
    512, Int32.MaxValue))

' Insert an EventMappingsSettings object into the EventMappings collection property.
healthMonitoringSection.EventMappings.Insert(1, _
    new EventMappingSettings("HeartBeats", "", 1, 2))

' Display contents of the EventMappings collection property
Console.WriteLine( _
    "EventMappings Collection contains {0} values:", healthMonitoringSection.EventMappings.Count)

' Display all elements.
For i As System.Int32 = 0 To healthMonitoringSection.EventMappings.Count - 1
eventMappingSetting = healthMonitoringSection.EventMappings(i)
Dim name As String = eventMappingSetting.Name
Dim type As String = eventMappingSetting.Type
Dim startCd As Integer = eventMappingSetting.StartEventCode
Dim endCd As Integer = eventMappingSetting.EndEventCode
    Dim item As String = "Name='" & name & "', Type='" & type & _
        "', StartEventCode =  '" & startCd.ToString() & _
        "', EndEventCode =  '" & endCd.ToString() & "'"
    Console.WriteLine("  Item {0}: {1}", i, item)
Next

' See if the EventMappings collection property contains the event 'HeartBeats'.
Console.WriteLine("EventMappings contains 'HeartBeats': {0}.", _
    healthMonitoringSection.EventMappings.Contains("HeartBeats"))

' Get the index of the 'HeartBeats' event in the EventMappings collection property.
Console.WriteLine("EventMappings index for 'HeartBeats': {0}.", _
    healthMonitoringSection.EventMappings.IndexOf("HeartBeats"))

' Get a named EventMappings
eventMappingSetting = healthMonitoringSection.EventMappings("HeartBeats")

' Remove an EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.Remove("HeartBeats")

' Remove an EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.RemoveAt(0)

' Clear all EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.Clear()

注釈

クラスは EventMappingSettings 、構成ファイル要素に eventMappings 対応します。 eventMappings要素を使用すると、イベント ソースにフレンドリ名を割り当てることができます。 これらの名前は、構成ファイルの セクションのサブセクションhealthMonitoringで、イベント ソースを関連するイベント コンシューマー (プロバイダーと呼ばれる) にrules関連付けるために使用されます。

コンストラクター

EventMappingSettingsCollection()

EventMappingSettingsCollection クラスの新しいインスタンスを初期化します。

プロパティ

AddElementName

派生クラスでオーバーライドされると、ConfigurationElement での追加操作に関連付ける ConfigurationElementCollection の名前を取得または設定します。

(継承元 ConfigurationElementCollection)
ClearElementName

派生クラスでオーバーライドされると、ConfigurationElement での消去操作に関連付ける ConfigurationElementCollection の名前を取得または設定します。

(継承元 ConfigurationElementCollection)
CollectionType

ConfigurationElementCollection の型を取得します。

(継承元 ConfigurationElementCollection)
Count

コレクション内の要素の数を取得します。

(継承元 ConfigurationElementCollection)
CurrentConfiguration

現在の Configuration インスタンスが属している構成階層を表す最上位の ConfigurationElement インスタンスへの参照を取得します。

(継承元 ConfigurationElement)
ElementInformation

ElementInformation オブジェクトのカスタマイズできない情報と機能を格納する ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
ElementName

派生クラスでオーバーライドされると、構成ファイル内のこの要素のコレクションを識別するために使用する名前を取得します。

(継承元 ConfigurationElementCollection)
ElementProperty

ConfigurationElementProperty オブジェクト自体を表す ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
EmitClear

コレクションが削除されたかどうかを示す値を取得または設定します。

(継承元 ConfigurationElementCollection)
EvaluationContext

ContextInformation オブジェクトの ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
HasContext

CurrentConfiguration プロパティが null であるかどうかを示す値を取得します。

(継承元 ConfigurationElement)
IsSynchronized

コレクションへのアクセスが同期されるかどうかを示す値を取得します。

(継承元 ConfigurationElementCollection)
Item[ConfigurationProperty]

この構成要素のプロパティまたは属性を取得または設定します。

(継承元 ConfigurationElement)
Item[Int32]

指定したインデックス位置の EventMappingSettings オブジェクトを取得または設定します。

Item[String]

コレクション内の指定されたキーに基づいて、EventMappingSettings オブジェクトを取得します。

LockAllAttributesExcept

ロックされている属性のコレクションを取得します。

(継承元 ConfigurationElement)
LockAllElementsExcept

ロックされている要素のコレクションを取得します。

(継承元 ConfigurationElement)
LockAttributes

ロックされている属性のコレクションを取得します。

(継承元 ConfigurationElement)
LockElements

ロックされている要素のコレクションを取得します。

(継承元 ConfigurationElement)
LockItem

要素がロックされているかどうかを示す値を取得または設定します。

(継承元 ConfigurationElement)
Properties

プロパティのコレクションを取得します。

(継承元 ConfigurationElement)
RemoveElementName

派生クラスでオーバーライドされると、ConfigurationElement での削除操作に関連付ける ConfigurationElementCollection の名前を取得または設定します。

(継承元 ConfigurationElementCollection)
SyncRoot

ConfigurationElementCollection へのアクセスを同期するために使用するオブジェクトを取得します。

(継承元 ConfigurationElementCollection)
ThrowOnDuplicate

重複する ConfigurationElementConfigurationElementCollection に追加しようとしたときに、例外をスローするかどうかを示す値を取得します。

(継承元 ConfigurationElementCollection)

メソッド

Add(EventMappingSettings)

コレクションに EventMappingSettings オブジェクトを追加します。

BaseAdd(ConfigurationElement)

ConfigurationElementCollection に構成要素を追加します。

(継承元 ConfigurationElementCollection)
BaseAdd(ConfigurationElement, Boolean)

構成要素のコレクションに構成要素を追加します。

(継承元 ConfigurationElementCollection)
BaseAdd(Int32, ConfigurationElement)

構成要素のコレクションに構成要素を追加します。

(継承元 ConfigurationElementCollection)
BaseClear()

コレクションからすべての構成要素オブジェクトを削除します。

(継承元 ConfigurationElementCollection)
BaseGet(Int32)

指定したインデックス位置にある構成要素を取得します。

(継承元 ConfigurationElementCollection)
BaseGet(Object)

指定したキーを持つ構成要素を返します。

(継承元 ConfigurationElementCollection)
BaseGetAllKeys()

ConfigurationElementCollection に格納されているすべての構成要素のキーの配列を返します。

(継承元 ConfigurationElementCollection)
BaseGetKey(Int32)

指定したインデックス位置にある ConfigurationElement のキーを取得します。

(継承元 ConfigurationElementCollection)
BaseIndexOf(ConfigurationElement)

指定した ConfigurationElement のインデックスを示します。

(継承元 ConfigurationElementCollection)
BaseIsRemoved(Object)

指定したキーを持つ ConfigurationElementConfigurationElementCollection から削除されているかどうかを示します。

(継承元 ConfigurationElementCollection)
BaseRemove(Object)

ConfigurationElement をコレクションから削除します。

(継承元 ConfigurationElementCollection)
BaseRemoveAt(Int32)

指定したインデックス位置にある ConfigurationElement を削除します。

(継承元 ConfigurationElementCollection)
Clear()

コレクションからすべての EventMappingSettings オブジェクトを削除します。

Contains(String)

指定した名前の EventMappingSettings オブジェクトがコレクション内に存在するかどうかを示します。

CopyTo(ConfigurationElement[], Int32)

ConfigurationElementCollection の内容を配列にコピーします。

(継承元 ConfigurationElementCollection)
CreateNewElement()

派生クラスでオーバーライドされると、新しい ConfigurationElement を作成します。

(継承元 ConfigurationElementCollection)
CreateNewElement(String)

派生クラスでオーバーライドされると、新しい ConfigurationElement を作成します。

(継承元 ConfigurationElementCollection)
DeserializeElement(XmlReader, Boolean)

構成ファイルから XML を読み取ります。

(継承元 ConfigurationElement)
Equals(Object)

ConfigurationElementCollection と指定したオブジェクトを比較します。

(継承元 ConfigurationElementCollection)
GetElementKey(ConfigurationElement)

派生クラスでオーバーライドされると、指定した構成要素の要素キーを取得します。

(継承元 ConfigurationElementCollection)
GetEnumerator()

IEnumerator の反復処理に使用する ConfigurationElementCollection を取得します。

(継承元 ConfigurationElementCollection)
GetHashCode()

ConfigurationElementCollection インスタンスを表す一意の値を取得します。

(継承元 ConfigurationElementCollection)
GetTransformedAssemblyString(String)

指定されたアセンブリ名を変換して返します。

(継承元 ConfigurationElement)
GetTransformedTypeString(String)

指定された型名を変換して返します。

(継承元 ConfigurationElement)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IndexOf(String)

指定した EventMappingSettings オブジェクトのインデックスを返します。

Init()

ConfigurationElement オブジェクトを初期状態に設定します。

(継承元 ConfigurationElement)
InitializeDefault()

ConfigurationElement オブジェクトの既定の値セットを初期化するために使用します。

(継承元 ConfigurationElement)
Insert(Int32, EventMappingSettings)

指定した EventMappingSettings オブジェクトを、コレクションの指定したインデックス位置に追加します。

IsElementName(String)

指定した ConfigurationElementConfigurationElementCollection に存在するかどうかを示します。

(継承元 ConfigurationElementCollection)
IsElementRemovable(ConfigurationElement)

指定した ConfigurationElementConfigurationElementCollection から削除できるかどうかを示します。

(継承元 ConfigurationElementCollection)
IsModified()

派生クラスでオーバーライドされると、この ConfigurationElementCollection が最後に保存された後または読み込まれた後に、変更されているかどうかを示します。

(継承元 ConfigurationElementCollection)
IsReadOnly()

ConfigurationElementCollection オブジェクトが読み取り専用かどうかを示します。

(継承元 ConfigurationElementCollection)
ListErrors(IList)

この ConfigurationElement オブジェクトおよびすべてのサブ要素の無効なプロパティのエラーを、渡されたリストに追加します。

(継承元 ConfigurationElement)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
OnDeserializeUnrecognizedAttribute(String, String)

逆シリカル化中に不明な属性が発生したかどうかを示す値を取得します。

(継承元 ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

構成システムが例外をスローするようにします。

(継承元 ConfigurationElementCollection)
OnRequiredPropertyNotFound(String)

必要なプロパティが見つからないと例外がスローされます。

(継承元 ConfigurationElement)
PostDeserialize()

逆シリアル化後に呼び出されます。

(継承元 ConfigurationElement)
PreSerialize(XmlWriter)

シリアル化前に呼び出されます。

(継承元 ConfigurationElement)
Remove(String)

EventMappingSettings オブジェクトをコレクションから削除します。

RemoveAt(Int32)

EventMappingSettings オブジェクトをコレクションから削除します。

Reset(ConfigurationElement)

派生クラスでオーバーライドされると、ConfigurationElementCollection を変更されていない状態にリセットします。

(継承元 ConfigurationElementCollection)
ResetModified()

派生クラスでオーバーライドされると、IsModified() プロパティの値を false にリセットします。

(継承元 ConfigurationElementCollection)
SerializeElement(XmlWriter, Boolean)

派生クラスでオーバーライドされると、構成データを構成ファイルの XML 要素に書き込みます。

(継承元 ConfigurationElementCollection)
SerializeToXmlElement(XmlWriter, String)

派生クラスに実装されている場合、この構成要素の外側のタグを構成ファイルに書き込みます。

(継承元 ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

プロパティを指定した値に設定します。

(継承元 ConfigurationElement)
SetReadOnly()

IsReadOnly() オブジェクトとすべてのサブ要素の ConfigurationElementCollection プロパティを設定します。

(継承元 ConfigurationElementCollection)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

構成階層の異なるレベルの構成情報をマージした効果を元に戻します。

(継承元 ConfigurationElementCollection)

明示的なインターフェイスの実装

ICollection.CopyTo(Array, Int32)

ConfigurationElementCollection を配列にコピーします。

(継承元 ConfigurationElementCollection)

拡張メソッド

Cast<TResult>(IEnumerable)

IEnumerable の要素を、指定した型にキャストします。

OfType<TResult>(IEnumerable)

指定された型に基づいて IEnumerable の要素をフィルター処理します。

AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryable に変換します。

適用対象

こちらもご覧ください