| ReceiveActorReceiveAsync Method (Type, FuncObject, Task, PredicateObject) |
Registers an asynchronous handler for incoming messages of the specified
messageType.
If
shouldHandle!=
null then it must return true before a message is passed to
handler.
Remarks The actor will be suspended until the task returned by handler completes.
Remarks Remarks Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked.
Namespace:
Akka.Actor
Assembly:
Akka (in Akka.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax protected void ReceiveAsync(
Type messageType,
Func<Object, Task> handler,
Predicate<Object> shouldHandle = null
)
member ReceiveAsync :
messageType : Type *
handler : Func<Object, Task> *
?shouldHandle : Predicate<Object>
(* Defaults:
let _shouldHandle = defaultArg shouldHandle null
*)
-> unit
Parameters
- messageType
- Type: SystemType
The type of the message - handler
- Type: SystemFuncObject, Task
The message handler that is invoked for incoming messages of the specified messageType - shouldHandle (Optional)
- Type: SystemPredicateObject
When not null it is used to determine if the message matches.
See Also