MatchBuilder<(Of <(<'TItem>)>)>..::..Match Method (Type, Action<(Of <(<'TItem>)>)>, Predicate<(Of <(<'TItem>)>)>)

Adds a handler that is called if the item being matched is of type handlesType and shouldHandle, if it has been specified, returns true.

Remarks


Note that if a previous added handler handled the item, this handler will not be invoked.

Namespace:  Akka.Tools.MatchHandler
Assembly:  Akka (in Akka.dll)

Syntax


public void Match(
	Type handlesType,
	Action<TItem> handler,
	Predicate<TItem> shouldHandle
)
Public Sub Match ( _
	handlesType As Type, _
	handler As Action(Of TItem), _
	shouldHandle As Predicate(Of TItem) _
)
public:
void Match(
	Type^ handlesType, 
	Action<TItem>^ handler, 
	Predicate<TItem>^ shouldHandle
)

Parameters

handlesType
Type: Type
The type that it must match in order for handler to be called.
handler
Type: Action<(Of <(<'TItem>)>)>
The handler that is invoked when everything matches.
shouldHandle
Type: Predicate<(Of <(<'TItem>)>)>
An optional predicate to test if the item matches. If it returns true the handler is invoked.