TypeDescriptor.GetEvents 메서드

정의

구성 요소나 형식에 대한 이벤트 컬렉션을 반환합니다.

오버로드

GetEvents(Object)

지정된 구성 요소에 대한 이벤트 컬렉션을 반환합니다.

GetEvents(Type)

구성 요소의 지정된 형식의 대한 이벤트 컬렉션을 반환합니다.

GetEvents(Object, Attribute[])

특성의 지정된 배열을 필터로 사용하여 지정된 구성 요소에 대한 이벤트 컬렉션을 반환합니다.

GetEvents(Object, Boolean)

사용자 지정 형식 설명자가 있는 지정된 구성 요소에 대한 이벤트 컬렉션을 반환합니다.

GetEvents(Type, Attribute[])

특성의 지정된 배열을 필터로 사용하여 구성 요소의 지정된 형식에 대한 이벤트 컬렉션을 반환합니다.

GetEvents(Object, Attribute[], Boolean)

지정한 특성 배열을 필터로 사용하고 사용자 지정 특성 설명자를 사용하여 지정된 구성 요소에 대한 이벤트 컬렉션을 반환합니다.

GetEvents(Object)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 매개 변수 instance 제공하는 이벤트 컬렉션을 검색합니다. 이 컬렉션은 클래스가 제공하는 이벤트 집합과 다를 수 있습니다. 매개 변수가 component 있는 경우 사이트에서 추가 이벤트를 추가하거나 제거할 수 있습니다.

가 이nullcomponent 빈 컬렉션이 반환됩니다.

반환된 컬렉션의 순서가 호출 간에 동일하지는 않으므로 항상 사용하기 전에 순서를 지정합니다.

추가 정보

적용 대상

GetEvents(Type)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 입니다.

설명

개체의 instance 없는 경우에만 이 메서드 버전을 호출합니다.

매개 변수가 이 componentTypenull면 빈 컬렉션이 반환됩니다.

반환된 컬렉션의 순서가 호출 간에 동일하지는 않으므로 항상 사용하기 전에 순서를 지정합니다.

추가 정보

적용 대상

GetEvents(Object, Attribute[])

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 대한 이벤트는 클래스의 이벤트와 다를 수 있습니다.

배열에는 attributesAttribute 개체가 Type 혼합되어 있을 수 있습니다. 필터링은 다음 규칙에 의해 정의됩니다.

  • Type 은 와일드카드로 처리되며 특성 집합에 가 있는 모든 이벤트와 Type 일치합니다.

  • 이벤트에 동일한 클래스의 가 Attribute 없으면 반환된 배열에 이벤트가 포함되지 않습니다.

  • 특성이 클래스의 Attribute instance 경우 이벤트는 정확히 일치해야 합니다. 그렇지 않으면 반환된 배열에 포함되지 않습니다.

  • Attribute instance 지정되고 기본 이벤트인 경우 이벤트에 의 instance Attribute 없는 경우에도 반환된 배열에 포함됩니다.

가 이nullcomponent 빈 컬렉션이 반환됩니다.

반환된 컬렉션의 순서가 호출 간에 동일하지는 않으므로 항상 사용하기 전에 순서를 지정합니다.

추가 정보

적용 대상

GetEvents(Object, Boolean)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 매개 변수 instance 제공하는 이벤트 컬렉션을 검색합니다. 이는 클래스가 제공하는 이벤트 집합과 다를 수 있습니다. 매개 변수가 component 있는 경우 사이트에서 추가 이벤트를 추가하거나 제거할 수 있습니다.

가 이nullcomponent 빈 컬렉션이 반환됩니다.

반환된 컬렉션의 순서가 호출 간에 동일하지는 않으므로 항상 사용하기 전에 순서를 지정합니다.

추가 정보

적용 대상

GetEvents(Type, Attribute[])

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 입니다.

설명

개체의 instance 없는 경우에만 이 메서드 버전을 호출합니다.

매개 변수 배열에는 attributesAttribute 개체가 Type 혼합되어 있을 수 있습니다. 필터링은 다음 규칙에 의해 정의됩니다.

  • Type 은 와일드카드로 처리되며 특성 집합에 가 있는 모든 이벤트와 Type 일치합니다.

  • 이벤트에 동일한 클래스의 가 Attribute 없으면 반환된 배열에 이벤트가 포함되지 않습니다.

  • 특성이 클래스의 Attribute instance 경우 이벤트는 정확히 일치해야 합니다. 그렇지 않으면 반환된 배열에 포함되지 않습니다.

  • Attribute instance 지정되고 기본 이벤트인 경우 이벤트에 의 instance Attribute 없는 경우에도 반환된 배열에 포함됩니다.

매개 변수가 이 componentTypenull면 빈 컬렉션이 반환됩니다.

반환된 컬렉션의 순서가 호출 간에 동일하지는 않으므로 항상 사용하기 전에 순서를 지정합니다.

추가 정보

적용 대상

GetEvents(Object, Attribute[], Boolean)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 대한 이벤트는 클래스의 이벤트와 다를 수 있습니다.

매개 변수 배열에는 attributesAttribute 개체가 Type 혼합되어 있을 수 있습니다. 필터링은 다음 규칙에 의해 정의됩니다.

  • Type 은 와일드카드로 처리되며 특성 집합에 가 있는 모든 이벤트와 Type 일치합니다.

  • 이벤트에 동일한 클래스의 가 Attribute 없으면 반환된 배열에 이벤트가 포함되지 않습니다.

  • 특성이 클래스의 Attribute instance 경우 이벤트는 정확히 일치해야 합니다. 그렇지 않으면 반환된 배열에 포함되지 않습니다.

  • Attribute instance 지정되고 기본 이벤트인 경우 이벤트에 의 instance Attribute 없는 경우에도 반환된 배열에 포함됩니다.

가 이nullcomponent 빈 컬렉션이 반환됩니다.

반환된 컬렉션의 순서가 호출 간에 동일하지는 않으므로 항상 사용하기 전에 순서를 지정합니다.

추가 정보

적용 대상