diff --git a/src/Avalonia.Interactivity/EventSubscription.cs b/src/Avalonia.Interactivity/EventSubscription.cs index b495142998..e8fb1bfaf1 100644 --- a/src/Avalonia.Interactivity/EventSubscription.cs +++ b/src/Avalonia.Interactivity/EventSubscription.cs @@ -5,11 +5,11 @@ using System; namespace Avalonia.Interactivity { - internal delegate void InvokeSignature(Delegate func, object sender, RoutedEventArgs args); + internal delegate void HandlerInvokeSignature(Delegate baseHandler, object sender, RoutedEventArgs args); internal class EventSubscription { - public InvokeSignature InvokeAdapter { get; set; } + public HandlerInvokeSignature InvokeAdapter { get; set; } public Delegate Handler { get; set; } diff --git a/src/Avalonia.Interactivity/Interactive.cs b/src/Avalonia.Interactivity/Interactive.cs index 0f607241ec..f8d388ec89 100644 --- a/src/Avalonia.Interactivity/Interactive.cs +++ b/src/Avalonia.Interactivity/Interactive.cs @@ -16,7 +16,7 @@ namespace Avalonia.Interactivity { private Dictionary> _eventHandlers; - private static readonly Dictionary s_invokeCache = new Dictionary(); + private static readonly Dictionary s_invokeHandlerCache = new Dictionary(); /// /// Gets the interactive parent of the object for bubbling and tunneling events. @@ -74,11 +74,11 @@ namespace Avalonia.Interactivity // that will cast our type erased instance and invoke it. Type eventArgsType = routedEvent.EventArgsType; - if (!s_invokeCache.TryGetValue(eventArgsType, out var invokeAdapter)) + if (!s_invokeHandlerCache.TryGetValue(eventArgsType, out var invokeAdapter)) { - void InvokeAdapter(Delegate func, object sender, RoutedEventArgs args) + void InvokeAdapter(Delegate baseHandler, object sender, RoutedEventArgs args) { - var typedHandler = (EventHandler)func; + var typedHandler = (EventHandler)baseHandler; var typedArgs = (TEventArgs)args; typedHandler(sender, typedArgs); @@ -86,7 +86,7 @@ namespace Avalonia.Interactivity invokeAdapter = InvokeAdapter; - s_invokeCache.Add(eventArgsType, invokeAdapter); + s_invokeHandlerCache.Add(eventArgsType, invokeAdapter); } var subscription = new EventSubscription