PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Event­Declaration Class / Event­Declaration Methods / Event­Declaration.​Get­System­Event Method / Event­Declaration.​Get­System­Event Method (Binding­Options)

EventDeclaration.GetSystemEvent Method (BindingOptions)

Gets a reflection EventInfo that wraps the current event.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public EventInfo GetSystemEvent(
	BindingOptions options
)

Parameters

options
Type: PostSharp.Sdk.CodeModel.BindingOptions
Options.

Return Value

Type: EventInfo
A EventInfo wrapping current event in the given generic context.
Remarks
This method returns a EventInfo that is different from the system runtime event that is retrieved by [!:GetSystemEvent(System.Type[],System.Type[],PostSharp.Sdk.CodeModel.BindingOptions)]. This allows a have a System.Reflection representation of the current event even when the declaring type it cannot be loaded in the Virtual Runtime Engine.
See Also