Example #1
0
 /// <summary>
 /// Returns the public methods that have been associated with an event in metadata using the .other directive.
 /// </summary>
 /// <param name="provider">The reflection introspection provider.</param>
 /// <param name="event">The event to get the associated methods for.</param>
 /// <returns>An array of <see cref="MethodInfo" /> objects representing the public methods that have been associated with the event in metadata by using the .other directive. If there are no such public methods, an empty array is returned.</returns>
 public static IReadOnlyList <MethodInfo> GetOtherMethods(this IEventInfoIntrospectionProvider provider, EventInfo @event) => NotNull(provider).GetOtherMethods(@event, nonPublic: false);
Example #2
0
 /// <summary>
 /// Gets a value indicating whether the event has the SpecialName attribute.
 /// </summary>
 /// <param name="provider">The reflection introspection provider.</param>
 /// <param name="event">The event to inspect.</param>
 /// <returns>true if the event has the SpecialName attribute set; otherwise, false.</returns>
 public static bool IsSpecialName(this IEventInfoIntrospectionProvider provider, EventInfo @event) => (NotNull(provider).GetAttributes(@event) & EventAttributes.SpecialName) > EventAttributes.None;
Example #3
0
 /// <summary>
 /// Returns the method that is called when the event is raised.
 /// </summary>
 /// <param name="provider">The reflection introspection provider.</param>
 /// <param name="event">The event to get the raise method for.</param>
 /// <returns>A <see cref="MethodInfo"/> object that was called when the event was raised.</returns>
 public static MethodInfo GetRaiseMethod(this IEventInfoIntrospectionProvider provider, EventInfo @event) => NotNull(provider).GetRaiseMethod(@event, nonPublic: false);