Click or drag to resize
Akka.NETReceiveActorReceive Method (Type, FuncObject, Boolean)
Registers a handler for incoming messages of the specified messageType. The handler should return true if it has handled the message. If the handler returns true no more handlers will be tried; otherwise the next registered handler will be tried.
Remarks
This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action).
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.42 (1.2.3.42)
Syntax
protected void Receive(
	Type messageType,
	Func<Object, bool> handler
)

Parameters

messageType
Type: SystemType
The type of the message
handler
Type: SystemFuncObject, Boolean
The message handler that is invoked for incoming messages of the specified type messageType. It should return trueif it handled/matched the message; false otherwise.
Exceptions
ExceptionCondition
InvalidOperationExceptionThis exception is thrown if this method is called outside of the actor's constructor or from Become(Action).
See Also