SubscribeExtensionMethods.Subscribe<R> Method (Stream<R, Epoch>, Action<Message<R, Epoch>, Int32>, Action<Epoch, Int32>, Action<Int32>)Naiad Help

[This is preliminary documentation and is subject to change.]

Subscribes to a stream with callbacks for record receipt, epoch completion notification, and stream completion notification.

Namespace: Microsoft.Research.Naiad
Assembly: Microsoft.Research.Naiad (in Microsoft.Research.Naiad.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax

C#
public static Subscription Subscribe<R>(
	this Stream<R, Epoch> stream,
	Action<Message<R, Epoch>, int> onRecv,
	Action<Epoch, int> onNotify,
	Action<int> onComplete
)

Parameters

stream
Type: Microsoft.Research.Naiad.Stream<R, Epoch>
input stream
onRecv
Type: System.Action<Message<R, Epoch>, Int32>
receipt callback
onNotify
Type: System.Action<Epoch, Int32>
notification callback
onComplete
Type: System.Action<Int32>
completion callback

Type Parameters

R
record type

Return Value

Type: Subscription
subscription for synchronization

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream<R, Epoch>. 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).
See Also

Reference