TypeDescriptor.GetEvents メソッド

定義

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

オーバーロード

GetEvents(Object)

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

GetEvents(Type)

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

GetEvents(Object, Attribute[])

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

GetEvents(Object, Boolean)

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

GetEvents(Type, Attribute[])

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

GetEvents(Object, Attribute[], Boolean)

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

GetEvents(Object)

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

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

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

例外

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

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

注釈

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

ある場合 componentnull、空のコレクションが返されます。

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

こちらもご覧ください

適用対象

GetEvents(Type)

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

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

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

注釈

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

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

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

こちらもご覧ください

適用対象

GetEvents(Object, Attribute[])

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

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

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

例外

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

注釈

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

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

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

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

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

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

ある場合 componentnull、空のコレクションが返されます。

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

こちらもご覧ください

適用対象

GetEvents(Object, Boolean)

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

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

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

例外

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

注釈

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

ある場合 componentnull、空のコレクションが返されます。

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

こちらもご覧ください

適用対象

GetEvents(Type, Attribute[])

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

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

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

注釈

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

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

  • A Type はワイルドカードとして扱われます。属性のセットを持つ Type イベントと一致します。

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

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

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

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

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

こちらもご覧ください

適用対象

GetEvents(Object, Attribute[], Boolean)

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

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

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

例外

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

注釈

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

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

  • A Type はワイルドカードとして扱われます。属性のセットを持つ Type イベントと一致します。

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

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

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

ある場合 componentnull、空のコレクションが返されます。

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

こちらもご覧ください

適用対象