Share via


IMessageBus.Subscribe Method

.NET Framework 4

Namespace:  Microsoft.AspNet.SignalR.Messaging
Assembly:  Microsoft.AspNet.SignalR.Core (in Microsoft.AspNet.SignalR.Core.dll)

Syntax

'Declaration
Function Subscribe ( _
    subscriber As ISubscriber, _
    cursor As String, _
    callback As Func(Of MessageResult, Task(Of Boolean)), _
    maxMessages As Integer _
) As IDisposable
'Usage
Dim instance As IMessageBus 
Dim subscriber As ISubscriber 
Dim cursor As String 
Dim callback As Func(Of MessageResult, Task(Of Boolean))
Dim maxMessages As Integer 
Dim returnValue As IDisposable 

returnValue = instance.Subscribe(subscriber, _
    cursor, callback, maxMessages)
IDisposable Subscribe(
    ISubscriber subscriber,
    string cursor,
    Func<MessageResult, Task<bool>> callback,
    int maxMessages
)
IDisposable^ Subscribe(
    ISubscriber^ subscriber, 
    String^ cursor, 
    Func<MessageResult, Task<bool>^>^ callback, 
    int maxMessages
)
abstract Subscribe : 
        subscriber:ISubscriber * 
        cursor:string * 
        callback:Func<MessageResult, Task<bool>> * 
        maxMessages:int -> IDisposable
function Subscribe(
    subscriber : ISubscriber, 
    cursor : String, 
    callback : Func<MessageResult, Task<boolean>>, 
    maxMessages : int
) : IDisposable

Parameters

Return Value

Type: System.IDisposable
Returns IDisposable.

See Also

Reference

IMessageBus Interface

Microsoft.AspNet.SignalR.Messaging Namespace