ISubscribe<'TDataEvent> Type
Instance members
Instance member | Description |
Full Usage:
this.Subscribe
Parameters:
'TDataEvent -> bool
-
Predicate function to determine if an event should be processed, e.g.
fun event -> event.CorrelationId = targetId .
take : int
-
Maximum number of events to process.
?callback : 'TDataEvent -> unit
-
Optional callback function to handle the event (defaults to ignoring the event if not provided).
?cancellationToken : CancellationToken
-
An optional cancellation token to cancel the subscription.
Returns: IAwaitableDisposable
Modifiers: abstract |
Example
val async: AsyncBuilder
val targetId: (obj -> obj)
val id: x: 'T -> 'T
val subscription: 'a
val query: Linq.QueryBuilder
Multiple items
type Async = static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool> static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool> static member CancelDefaultToken: unit -> unit static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>> static member Choice: computations: Async<'T option> seq -> Async<'T option> static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> ... -------------------- type Async<'T> static member Async.Start: computation: Async<unit> * ?cancellationToken: System.Threading.CancellationToken -> unit
|
Full Usage:
this.Subscribe
Parameters:
'TDataEvent -> unit
-
Function invoked for each event, e.g. printing or processing the event.
?cancellationToken : CancellationToken
-
An optional cancellation token to cancel the subscription.
Returns: IDisposable
Modifiers: abstract |
Example
val subscription: obj
val query: Linq.QueryBuilder
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
|