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

Adds a handler that is called if the item being matched is of type T 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<T>(
	Action<T> handler,
	Predicate<T> shouldHandle
)
where T : TItem, TItem
Public Sub Match(Of T As {TItem, TItem}) ( _
	handler As Action(Of T), _
	shouldHandle As Predicate(Of T) _
)
public:
generic<typename T>
where T : TItem, TItem
void Match(
	Action<T>^ handler, 
	Predicate<T>^ shouldHandle
)

Type Parameters

T
The type that it must match in order for handler to be called.

Parameters

handler
Type: Action<(Of <(<'T>)>)>
The handler that is invoked when everything matches.
shouldHandle
Type: Predicate<(Of <(<'T>)>)>
An optional predicate to test if the item matches. If it returns true the handler is invoked.