Share via


HubProxyExtensions.On<T1, T2, T3, T4, T5, T6> Method (IHubProxy, String, Action<T1, T2, T3, T4, T5, T6>)

.NET Framework 4.5

Registers for an event with the specified name and callback

Namespace:  Microsoft.AspNet.SignalR.Client
Assembly:  Microsoft.AspNet.SignalR.Client (in Microsoft.AspNet.SignalR.Client.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function On(Of T1, T2, T3, T4, T5, T6) ( _
    proxy As IHubProxy, _
    eventName As String, _
    onData As Action(Of T1, T2, T3, T4, T5, T6) _
) As IDisposable
'Usage
Dim proxy As IHubProxy 
Dim eventName As String 
Dim onData As Action(Of T1, T2, T3, T4, T5, T6)
Dim returnValue As IDisposable 

returnValue = proxy.On(eventName, _
    onData)
public static IDisposable On<T1, T2, T3, T4, T5, T6>(
    this IHubProxy proxy,
    string eventName,
    Action<T1, T2, T3, T4, T5, T6> onData
)
[ExtensionAttribute]
public:
generic<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
static IDisposable^ On(
    IHubProxy^ proxy, 
    String^ eventName, 
    Action<T1, T2, T3, T4, T5, T6>^ onData
)
static member On : 
        proxy:IHubProxy * 
        eventName:string * 
        onData:Action<'T1, 'T2, 'T3, 'T4, 'T5, 'T6> -> IDisposable
JScript does not support generic types and methods.

Type Parameters

  • T1
  • T2
  • T3
  • T4
  • T5
  • T6

Parameters

  • onData
    Type: System.Action<T1, T2, T3, T4, T5, T6>
    The callback

Return Value

Type: System.IDisposable
An IDisposable that represents this subscription.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IHubProxy. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.118) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.118).

See Also

Reference

HubProxyExtensions Class

On Overload

Microsoft.AspNet.SignalR.Client Namespace