EnumBuilder.GetEvents Método

Definição

Esse método não tem suporte em tipos que não foram concluídos.This method is not supported on types that have not been completed.

Sobrecargas

GetEvents()

Retorna os eventos para os eventos públicos declarados ou herdados por esse tipo.Returns the events for the public events declared or inherited by this type.

GetEvents(BindingFlags)

Retorna os eventos públicos e não públicos que são declarados por esse tipo.Returns the public and non-public events that are declared by this type.

GetEvents()

Retorna os eventos para os eventos públicos declarados ou herdados por esse tipo.Returns the events for the public events declared or inherited by this type.

public:
 override cli::array <System::Reflection::EventInfo ^> ^ GetEvents();
public override System.Reflection.EventInfo[] GetEvents ();
override this.GetEvents : unit -> System.Reflection.EventInfo[]
Public Overrides Function GetEvents () As EventInfo()

Retornos

EventInfo[]

Retorna uma matriz de objetos EventInfo que representa os eventos públicos declarados ou herdados por esse tipo.Returns an array of EventInfo objects representing the public events declared or inherited by this type. Uma matriz vazia será retornada se não houver eventos públicos.An empty array is returned if there are no public events.

Exceções

Atualmente, esse método não tem suporte em tipos que não estão completos.This method is not currently supported in types that are not complete.

Comentários

Como alternativa, para recuperar os eventos de um tipo concluído, recupere o tipo usando Type.GetType ou Assembly.GetType e use reflexão no tipo recuperado.As a workaround, to retrieve the events of a finished type, retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

Aplica-se a

GetEvents(BindingFlags)

Retorna os eventos públicos e não públicos que são declarados por esse tipo.Returns the public and non-public events that are declared by this type.

public:
 override cli::array <System::Reflection::EventInfo ^> ^ GetEvents(System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.EventInfo[] GetEvents (System.Reflection.BindingFlags bindingAttr);
override this.GetEvents : System.Reflection.BindingFlags -> System.Reflection.EventInfo[]
Public Overrides Function GetEvents (bindingAttr As BindingFlags) As EventInfo()

Parâmetros

bindingAttr
BindingFlags

Esse deve ser um sinalizador de bit de BindingFlags, tal como InvokeMethod, NonPublic e assim por diante.This must be a bit flag from BindingFlags, such as InvokeMethod, NonPublic, and so on.

Retornos

EventInfo[]

Retorna uma matriz de objetos EventInfo que representam os eventos públicos e não públicos declarados ou herdados por esse tipo.Returns an array of EventInfo objects representing the public and non-public events declared or inherited by this type. Se não há eventos, uma matriz vazia é retornada, conforme especificado.An empty array is returned if there are no events, as specified.

Exceções

Atualmente, esse método não tem suporte em tipos que não estão completos.This method is not currently supported in types that are not complete.

Comentários

Como alternativa, para recuperar os eventos de um tipo concluído, recupere o tipo usando Type.GetType ou Assembly.GetType e use reflexão no tipo recuperado para recuperar os eventos.As a workaround, to retrieve the events of a finished type, retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type to retrieve the events.

Aplica-se a