From df4d901ae7a79e4c39ec53833e0594ab7cc3123f Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Fri, 13 Apr 2018 00:37:13 +0000 Subject: [PATCH] Fix 5 param On extension method (#1984) --- .../HubConnectionExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.cs b/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.cs index 5588a97b4a..245a80c0f1 100644 --- a/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.cs +++ b/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.cs @@ -78,14 +78,14 @@ namespace Microsoft.AspNetCore.SignalR.Client args => handler((T1)args[0], (T2)args[1], (T3)args[2], (T4)args[3])); } - public static void On(this HubConnection hubConnection, string methodName, Action handler) + public static IDisposable On(this HubConnection hubConnection, string methodName, Action handler) { if (hubConnection == null) { throw new ArgumentNullException(nameof(hubConnection)); } - hubConnection.On(methodName, + return hubConnection.On(methodName, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, args => handler((T1)args[0], (T2)args[1], (T3)args[2], (T4)args[3], (T5)args[4])); }