Language

TypeDescriptor.GetEvents メソッド

定義

コンポーネントまたは型のイベントのコレクションを返します。

オーバーロード

名前 説明
GetEvents(Object)

指定したコンポーネントのイベントのコレクションを返します。

GetEvents(Type)

指定した種類のコンポーネントのイベントのコレクションを返します。

GetEvents(Object, Attribute[])

指定した属性の配列をフィルターとして使用して、指定したコンポーネントのイベントのコレクションを返します。

GetEvents(Object, Boolean)

カスタム型記述子を持つ指定したコンポーネントのイベントのコレクションを返します。

GetEvents(Type, Attribute[])

指定した属性配列をフィルターとして使用して、指定した種類のコンポーネントのイベントのコレクションを返します。

GetEvents(Object, Attribute[], Boolean)

指定した属性の配列をフィルターとして使用し、カスタム型記述子を使用して、指定したコンポーネントのイベントのコレクションを返します。

GetEvents(Object)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

指定したコンポーネントのイベントのコレクションを返します。

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component);
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member GetEvents : obj -> System.ComponentModel.EventDescriptorCollection
static member GetEvents : obj -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (component As Object) As EventDescriptorCollection

パラメーター

component
Object

イベントを取得する対象のコンポーネント。

返品

このコンポーネントのイベントを含む EventDescriptorCollection 。

属性

例外

component は、プロセス間のリモート オブジェクトです。

例

このメソッドの例については、 Count プロパティを参照してください。

注釈

指定された component パラメーター インスタンスが提供するイベントのコレクションを取得します。 このコレクションは、クラスが提供するイベントのセットとは異なる場合があります。 component パラメーターがサイト化されている場合、サイトは追加のイベントを追加または削除できます。

componentがnull場合は、空のコレクションが返されます。

返されるコレクションの順序は、呼び出し間で同一であるとは限らないので、必ず使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Type)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

指定した種類のコンポーネントのイベントのコレクションを返します。

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(Type ^ componentType);
public static System.ComponentModel.EventDescriptorCollection GetEvents(Type componentType);
static member GetEvents : Type -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (componentType As Type) As EventDescriptorCollection

パラメーター

componentType
Type

ターゲット コンポーネントの Type 。

返品

このコンポーネントのイベントを含む EventDescriptorCollection 。

注釈

オブジェクトのインスタンスがない場合にのみ、このバージョンのこのメソッドを呼び出します。

componentType パラメーターがnullの場合は、空のコレクションが返されます。

返されるコレクションの順序は、呼び出し間で同一であるとは限らないので、必ず使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Object, Attribute[])

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

指定した属性の配列をフィルターとして使用して、指定したコンポーネントのイベントのコレクションを返します。

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component, cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")]
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, Attribute[] attributes);
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")>]
static member GetEvents : obj * Attribute[] -> System.ComponentModel.EventDescriptorCollection
static member GetEvents : obj * Attribute[] -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (component As Object, attributes As Attribute()) As EventDescriptorCollection

パラメーター

component
Object

イベントを取得する対象のコンポーネント。

attributes
Attribute[]

フィルターとして使用できる Attribute 型の配列。

返品

このコンポーネントの指定した属性と一致するイベントを含む EventDescriptorCollection 。

属性

例外

component は、プロセス間のリモート オブジェクトです。

注釈

component パラメーターがサイト化されている場合、サイトでイベントを追加または削除できるため、component パラメーターのイベントはクラスのイベントとは異なる場合があります。

attributes配列には、TypeオブジェクトとAttributeオブジェクトを混在させることができます。 フィルター処理は、次の規則によって定義されます。

  • Typeはワイルドカードとして扱われます。属性のセットにTypeがあるイベントと一致します。

  • イベントに同じクラスの Attribute がない場合、イベントは返される配列に含まれません。

  • 属性が Attribute クラスのインスタンスである場合、イベントは完全に一致しているか、返された配列に含まれていない必要があります。

  • Attribute インスタンスが指定され、それが既定のイベントである場合、イベントにAttributeのインスタンスがない場合でも、返される配列に含まれます。

componentがnull場合は、空のコレクションが返されます。

返されるコレクションの順序は、呼び出し間で同一であるとは限らないので、必ず使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Object, Boolean)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

カスタム型記述子を持つ指定したコンポーネントのイベントのコレクションを返します。

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member GetEvents : obj * bool -> System.ComponentModel.EventDescriptorCollection
static member GetEvents : obj * bool -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (component As Object, noCustomTypeDesc As Boolean) As EventDescriptorCollection

パラメーター

component
Object

イベントを取得する対象のコンポーネント。

noCustomTypeDesc
Boolean

true カスタム型の説明情報を考慮しない場合。それ以外の場合は false。

返品

このコンポーネントのイベントを含む EventDescriptorCollection 。

属性

例外

component は、プロセス間のリモート オブジェクトです。

注釈

このメソッドは、指定された component パラメーター インスタンスが提供するイベントのコレクションを取得します。 これは、クラスが提供するイベントのセットとは異なる場合があります。 component パラメーターがサイト化されている場合、サイトは追加のイベントを追加または削除できます。

componentがnull場合は、空のコレクションが返されます。

返されるコレクションの順序は、呼び出し間で同一であるとは限らないので、必ず使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Type, Attribute[])

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

指定した属性配列をフィルターとして使用して、指定した種類のコンポーネントのイベントのコレクションを返します。

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(Type ^ componentType, cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")]
public static System.ComponentModel.EventDescriptorCollection GetEvents(Type componentType, Attribute[] attributes);
public static System.ComponentModel.EventDescriptorCollection GetEvents(Type componentType, Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")>]
static member GetEvents : Type * Attribute[] -> System.ComponentModel.EventDescriptorCollection
static member GetEvents : Type * Attribute[] -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (componentType As Type, attributes As Attribute()) As EventDescriptorCollection

パラメーター

componentType
Type

ターゲット コンポーネントの Type 。

attributes
Attribute[]

フィルターとして使用できる Attribute 型の配列。

返品

このコンポーネントの指定した属性と一致するイベントを含む EventDescriptorCollection 。

属性

注釈

オブジェクトのインスタンスがない場合にのみ、このバージョンのこのメソッドを呼び出します。

attributes パラメーター配列には、TypeオブジェクトとAttribute オブジェクトを混在させることができます。 フィルター処理は、次の規則によって定義されます。

  • Typeはワイルドカードとして扱われます。属性のセットにTypeがあるイベントと一致します。

  • イベントに同じクラスの Attribute がない場合、イベントは返される配列に含まれません。

  • 属性が Attribute クラスのインスタンスである場合、イベントは完全に一致しているか、返された配列に含まれていない必要があります。

  • Attribute インスタンスが指定され、それが既定のイベントである場合、イベントにAttributeのインスタンスがない場合でも、返される配列に含まれます。

componentType パラメーターがnullの場合は、空のコレクションが返されます。

返されるコレクションの順序は、呼び出し間で同一であるとは限らないので、必ず使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Object, Attribute[], Boolean)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

指定した属性の配列をフィルターとして使用し、カスタム型記述子を使用して、指定したコンポーネントのイベントのコレクションを返します。

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component, cli::array <Attribute ^> ^ attributes, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")]
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, Attribute[]? attributes, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, Attribute[] attributes, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")>]
static member GetEvents : obj * Attribute[] * bool -> System.ComponentModel.EventDescriptorCollection
static member GetEvents : obj * Attribute[] * bool -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (component As Object, attributes As Attribute(), noCustomTypeDesc As Boolean) As EventDescriptorCollection

パラメーター

component
Object

イベントを取得する対象のコンポーネント。

attributes
Attribute[]

フィルターとして使用する Attribute 型の配列。

noCustomTypeDesc
Boolean

true カスタム型の説明情報を考慮しない場合。それ以外の場合は false。

返品

このコンポーネントの指定した属性と一致するイベントを含む EventDescriptorCollection 。

属性

例外

component は、プロセス間のリモート オブジェクトです。

注釈

component パラメーターがサイト化されている場合、サイトでイベントを追加または削除できるため、component パラメーターのイベントはクラスのイベントとは異なる場合があります。

attributes パラメーター配列には、TypeオブジェクトとAttribute オブジェクトを混在させることができます。 フィルター処理は、次の規則によって定義されます。

  • Typeはワイルドカードとして扱われます。属性のセットにTypeがあるイベントと一致します。

  • イベントに同じクラスの Attribute がない場合、イベントは返される配列に含まれません。

  • 属性が Attribute クラスのインスタンスである場合、イベントは完全に一致しているか、返された配列に含まれていない必要があります。

  • Attribute インスタンスが指定され、それが既定のイベントである場合、イベントにAttributeのインスタンスがない場合でも、返される配列に含まれます。

componentがnull場合は、空のコレクションが返されます。

返されるコレクションの順序は、呼び出し間で同一であるとは限らないので、必ず使用する前に並べ替えます。

こちらもご覧ください

適用対象