IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol Class Reference
Inheritance diagram for IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol:
IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol IKVM.CoreLib.Symbols.IEventSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol IKVM.CoreLib.Symbols.IMemberSymbol IKVM.CoreLib.Symbols.IMemberSymbol IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider

Public Member Functions

 ReflectionEventSymbol (ReflectionSymbolContext context, ReflectionTypeSymbol type, EventInfo underlyingEvent)
 Initializes a new instance.
 
IMethodSymbolGetAddMethod ()
 Returns the method used to add an event handler delegate to the event source.
Returns

 
IMethodSymbolGetAddMethod (bool nonPublic)
 Returns the method used to add an event handler delegate to the event source, specifying whether to return non-public methods.
Parameters
nonPublic
Returns

 
IMethodSymbolGetRemoveMethod ()
 Returns the method used to remove an event handler delegate from the event source.
Returns

 
IMethodSymbolGetRemoveMethod (bool nonPublic)
 When overridden in a derived class, retrieves the IMethodSymbol object for removing a method of the event, specifying whether to return non-public methods.
Parameters
nonPublic
Returns

 
IMethodSymbolGetRaiseMethod ()
 Returns the method that is called when the event is raised.
Returns

 
IMethodSymbolGetRaiseMethod (bool nonPublic)
 When overridden in a derived class, returns the method that is called when the event is raised, specifying whether to return non-public methods.
Parameters
nonPublic
Returns

 
IMethodSymbol[] GetOtherMethods ()
 Returns the public methods that have been associated with an event in metadata using the .other directive.
Returns

 
IMethodSymbol[] GetOtherMethods (bool nonPublic)
 Returns the methods that have been associated with the event in metadata using the .other directive, specifying whether to include non-public methods.
Parameters
nonPublic
Returns

 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol
 ReflectionMemberSymbol (ReflectionSymbolContext context, ReflectionModuleSymbol module, ReflectionTypeSymbol? type, MemberInfo underlyingMember)
 Initializes a new instance.
 
virtual ImmutableArray< CustomAttributeSymbolGetCustomAttributes ()
 Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.
Returns

 
virtual ImmutableArray< CustomAttributeSymbolGetCustomAttributes (ITypeSymbol attributeType)
 Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.
Parameters
attributeType
Returns

 
virtual bool IsDefined (ITypeSymbol attributeType)
 Indicates whether one or more instance of attributeType is defined on this member.
Parameters
attributeType
Returns

 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol
 ReflectionSymbol (ReflectionSymbolContext context)
 Initializes a new instance.
 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider
- Public Member Functions inherited from IKVM.CoreLib.Symbols.IEventSymbol

Properties

EventAttributes Attributes [get]
 Gets the attributes for this event.
 
ITypeSymbolEventHandlerType [get]
 Gets the object of the underlying event-handler delegate associated with this event.
 
bool IsSpecialName [get]
 Gets a value indicating whether the IEventSymbol has a name with a special meaning.
 
IMethodSymbolAddMethod [get]
 Returns the method used to add an event handler delegate to the event source.
 
IMethodSymbolRemoveMethod [get]
 Returns the method used to remove an event handler delegate from the event source.
 
IMethodSymbolRaiseMethod [get]
 Returns the method that is called when the event is raised.
 
- Properties inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol
virtual IModuleSymbol Module [get]
 Gets the module in which the type that declares the member represented by the current is defined.
 
virtual ? ITypeSymbol DeclaringType [get]
 Gets the class that declares this member.
 
virtual MemberTypes MemberType [get]
 When overridden in a derived class, gets a value indicating the type of the member - method, constructor, event, and so on.
 
virtual int MetadataToken [get]
 Gets a value that identifies a metadata element.
 
virtual string Name [get]
 Gets the name of the current member.
 
- Properties inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol
ReflectionSymbolContext Context [get]
 Gets the associated ReflectionSymbolContext.
 
virtual bool IsMissing [get]
 Returns true if the symbol is missing.
 
- Properties inherited from IKVM.CoreLib.Symbols.ISymbol
- Properties inherited from IKVM.CoreLib.Symbols.IMemberSymbol
- Properties inherited from IKVM.CoreLib.Symbols.IEventSymbol

Additional Inherited Members

- Protected Member Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol
virtual ReflectionMemberSymbol ResolveMemberSymbol (MemberInfo member)
 Resolves the symbol for the specified type.
 
- Package Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol
- Package Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol

Detailed Description

Definition at line 7 of file ReflectionEventSymbol.cs.

Constructor & Destructor Documentation

◆ ReflectionEventSymbol()

IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.ReflectionEventSymbol ( ReflectionSymbolContext context,
ReflectionTypeSymbol type,
EventInfo underlyingEvent )

Initializes a new instance.

Parameters
context
type
underlyingEvent

Definition at line 18 of file ReflectionEventSymbol.cs.

18 :
19 base(context, type.ContainingModule, type, underlyingEvent)
20 {
21 _underlyingEvent = underlyingEvent ?? throw new ArgumentNullException(nameof(underlyingEvent));
22 }

Member Function Documentation

◆ GetAddMethod() [1/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetAddMethod ( )

Returns the method used to add an event handler delegate to the event source.

Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 48 of file ReflectionEventSymbol.cs.

49 {
50 return _underlyingEvent.GetAddMethod() is { } m ? ResolveMethodSymbol(m) : null;
51 }

◆ GetAddMethod() [2/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetAddMethod ( bool nonPublic)

Returns the method used to add an event handler delegate to the event source, specifying whether to return non-public methods.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 54 of file ReflectionEventSymbol.cs.

55 {
56 return _underlyingEvent.GetAddMethod(nonPublic) is { } m ? ResolveMethodSymbol(m) : null;
57 }

◆ GetOtherMethods() [1/2]

IMethodSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetOtherMethods ( )

Returns the public methods that have been associated with an event in metadata using the .other directive.

Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 84 of file ReflectionEventSymbol.cs.

85 {
86 return ResolveMethodSymbols(_underlyingEvent.GetOtherMethods());
87 }

◆ GetOtherMethods() [2/2]

IMethodSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetOtherMethods ( bool nonPublic)

Returns the methods that have been associated with the event in metadata using the .other directive, specifying whether to include non-public methods.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 90 of file ReflectionEventSymbol.cs.

91 {
92 return ResolveMethodSymbols(_underlyingEvent.GetOtherMethods(nonPublic));
93 }

◆ GetRaiseMethod() [1/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetRaiseMethod ( )

Returns the method that is called when the event is raised.

Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 72 of file ReflectionEventSymbol.cs.

73 {
74 return _underlyingEvent.GetRaiseMethod() is { } m ? ResolveMethodSymbol(m) : null;
75 }

◆ GetRaiseMethod() [2/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetRaiseMethod ( bool nonPublic)

When overridden in a derived class, returns the method that is called when the event is raised, specifying whether to return non-public methods.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 78 of file ReflectionEventSymbol.cs.

79 {
80 return _underlyingEvent.GetRaiseMethod(nonPublic) is { } m ? ResolveMethodSymbol(m) : null;
81 }

◆ GetRemoveMethod() [1/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetRemoveMethod ( )

Returns the method used to remove an event handler delegate from the event source.

Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 60 of file ReflectionEventSymbol.cs.

61 {
62 return _underlyingEvent.GetRemoveMethod() is { } m ? ResolveMethodSymbol(m) : null;
63 }

◆ GetRemoveMethod() [2/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.GetRemoveMethod ( bool nonPublic)

When overridden in a derived class, retrieves the IMethodSymbol object for removing a method of the event, specifying whether to return non-public methods.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 66 of file ReflectionEventSymbol.cs.

67 {
68 return _underlyingEvent.GetRemoveMethod(nonPublic) is { } m ? ResolveMethodSymbol(m) : null;
69 }

Property Documentation

◆ AddMethod

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.AddMethod
get

Returns the method used to add an event handler delegate to the event source.

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 39 of file ReflectionEventSymbol.cs.

39{ } m ? ResolveMethodSymbol(m) : null;

◆ Attributes

EventAttributes IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.Attributes
get

Gets the attributes for this event.

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 30 of file ReflectionEventSymbol.cs.

◆ EventHandlerType

ITypeSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.EventHandlerType
get

Gets the object of the underlying event-handler delegate associated with this event.

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 33 of file ReflectionEventSymbol.cs.

33{ } m ? ResolveTypeSymbol(m) : null;

◆ IsSpecialName

bool IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.IsSpecialName
get

Gets a value indicating whether the IEventSymbol has a name with a special meaning.

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 36 of file ReflectionEventSymbol.cs.

◆ RaiseMethod

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.RaiseMethod
get

Returns the method that is called when the event is raised.

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 45 of file ReflectionEventSymbol.cs.

45{ } m ? ResolveMethodSymbol(m) : null;

◆ RemoveMethod

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionEventSymbol.RemoveMethod
get

Returns the method used to remove an event handler delegate from the event source.

Implements IKVM.CoreLib.Symbols.IEventSymbol.

Definition at line 42 of file ReflectionEventSymbol.cs.

42{ } m ? ResolveMethodSymbol(m) : null;

The documentation for this class was generated from the following file: