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

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

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component);
public static System.ComponentModel.EventDescriptorCollection GetEvents (object component);
static member GetEvents : obj -> System.ComponentModel.EventDescriptorCollection
Public Shared Function GetEvents (component As Object) As EventDescriptorCollection

パラメーター

component
Object

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

戻り値

このコンポーネントのイベントを伴う EventDescriptorCollection

例外

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

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

注釈

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

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

返されるコレクションの順序は、呼び出し間で同一であることが保証されないため、常に使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Type)

ソース:
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

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

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component, cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.EventDescriptorCollection GetEvents (object component, Attribute[] attributes);
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、 オブジェクトと Attribute オブジェクトをType混在させることができます。 フィルター処理は、次の規則によって定義されます。

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

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

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

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

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

返されるコレクションの順序は、呼び出し間で同一であることが保証されないため、常に使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Object, Boolean)

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

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

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptorCollection GetEvents (object component, bool noCustomTypeDesc);
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 サイト化されている場合、サイトは追加のイベントを追加または削除できます。

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

返されるコレクションの順序は、呼び出し間で同一であることが保証されないため、常に使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Type, Attribute[])

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

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

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(Type ^ componentType, cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.EventDescriptorCollection GetEvents (Type componentType, Attribute[] attributes);
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、 オブジェクトと Attribute オブジェクトをType混在させることができます。 フィルター処理は、次の規則によって定義されます。

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

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

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

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

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

返されるコレクションの順序は、呼び出し間で同一であることが保証されないため、常に使用する前に並べ替えます。

こちらもご覧ください

適用対象

GetEvents(Object, Attribute[], Boolean)

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

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

public:
 static System::ComponentModel::EventDescriptorCollection ^ GetEvents(System::Object ^ component, cli::array <Attribute ^> ^ attributes, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptorCollection GetEvents (object component, Attribute[] attributes, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptorCollection GetEvents (object component, Attribute[]? attributes, bool noCustomTypeDesc);
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、 オブジェクトと Attribute オブジェクトをType混在させることができます。 フィルター処理は、次の規則によって定義されます。

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

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

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

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

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

返されるコレクションの順序は、呼び出し間で同一であることが保証されないため、常に使用する前に並べ替えます。

こちらもご覧ください

適用対象