ComponentExtensionsGetSubscribedEvents Method
Gets a list of events declared in the source Component
that are subscribed to a event-handler.
Namespace: DevCase.Extensions.ComponentExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static IReadOnlyCollection<EventInfo> GetSubscribedEvents(
this Component component,
bool declaredOnly
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetSubscribedEvents (
component As Component,
declaredOnly As Boolean
) As IReadOnlyCollection(Of EventInfo)
Dim component As Component
Dim declaredOnly As Boolean
Dim returnValue As IReadOnlyCollection(Of EventInfo)
returnValue = component.GetSubscribedEvents(declaredOnly)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static IReadOnlyCollection<EventInfo^>^ GetSubscribedEvents(
Component^ component,
bool declaredOnly
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetSubscribedEvents :
component : Component *
declaredOnly : bool -> IReadOnlyCollection<EventInfo>
No code example is currently available or this language may not be supported.
- component Component
-
The source Component.
- declaredOnly Boolean
-
If , only events declared at the
level of the supplied type's hierarchy should be considered.
Inherited events are not considered.
IReadOnlyCollectionEventInfo
A list of events declared in the source
Component
that are subscribed to a event-handler.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Component. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim ctrl As New Button()
AddHandler ctrl.Click, Sub() Console.WriteLine("Test")
AddHandler ctrl.DoubleClick, Sub() Console.WriteLine("Test") ' declaredOnly:=True
Dim subscribedEvents As IReadOnlyCollection(Of EventInfo) = ctrl.GetSubscribedEvents(declaredOnly:=True)
For Each ev As EventInfo In subscribedEvents
Console.WriteLine($"Event Name: {ev.Name}")
Next ev
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.