2using System.Reflection;
19 base(context, type.ContainingModule, type, underlyingEvent)
21 _underlyingEvent = underlyingEvent ??
throw new ArgumentNullException(nameof(underlyingEvent));
27 internal EventInfo UnderlyingEvent => _underlyingEvent;
30 public EventAttributes
Attributes => _underlyingEvent.Attributes;
50 return _underlyingEvent.GetAddMethod() is { } m ? ResolveMethodSymbol(m) :
null;
56 return _underlyingEvent.GetAddMethod(nonPublic) is { } m ? ResolveMethodSymbol(m) :
null;
62 return _underlyingEvent.GetRemoveMethod() is { } m ? ResolveMethodSymbol(m) :
null;
68 return _underlyingEvent.GetRemoveMethod(nonPublic) is { } m ? ResolveMethodSymbol(m) :
null;
74 return _underlyingEvent.GetRaiseMethod() is { } m ? ResolveMethodSymbol(m) :
null;
80 return _underlyingEvent.GetRaiseMethod(nonPublic) is { } m ? ResolveMethodSymbol(m) :
null;
86 return ResolveMethodSymbols(_underlyingEvent.GetOtherMethods());
92 return ResolveMethodSymbols(_underlyingEvent.GetOtherMethods(nonPublic));
IKVM.Reflection.EventInfo EventInfo
IMethodSymbol? GetAddMethod(bool nonPublic)
Returns the method used to add an event handler delegate to the event source, specifying whether to r...
IMethodSymbol? GetRemoveMethod()
Returns the method used to remove an event handler delegate from the event source.
EventAttributes Attributes
Gets the attributes for this event.
ReflectionEventSymbol(ReflectionSymbolContext context, ReflectionTypeSymbol type, EventInfo underlyingEvent)
Initializes a new instance.
IMethodSymbol? RaiseMethod
Returns the method that is called when the event is raised.
IMethodSymbol? AddMethod
Returns the method used to add an event handler delegate to the event source.
IMethodSymbol[] GetOtherMethods(bool nonPublic)
Returns the methods that have been associated with the event in metadata using the ....
IMethodSymbol? GetRaiseMethod()
Returns the method that is called when the event is raised.
IMethodSymbol? GetRemoveMethod(bool nonPublic)
When overridden in a derived class, retrieves the IMethodSymbol object for removing a method of the e...
IMethodSymbol? GetRaiseMethod(bool nonPublic)
When overridden in a derived class, returns the method that is called when the event is raised,...
IMethodSymbol[] GetOtherMethods()
Returns the public methods that have been associated with an event in metadata using the ....
ITypeSymbol? EventHandlerType
Gets the object of the underlying event-handler delegate associated with this event.
IMethodSymbol? GetAddMethod()
Returns the method used to add an event handler delegate to the event source.
IMethodSymbol? RemoveMethod
Returns the method used to remove an event handler delegate from the event source.
bool IsSpecialName
Gets a value indicating whether the IEventSymbol has a name with a special meaning.
Obtains information about the attributes of a member and provides access to member metadata.
Holds references to symbols derived from System.Reflection.
Discovers the attributes of an event and provides access to event metadata.
Discovers the attributes of a method and provides access to method metadata.
Represents type declarations: class types, interface types, array types, value types,...