| TestKitBaseReceiveWhileT Method (PredicateT, NullableTimeSpan, NullableTimeSpan, Int32, Boolean) |
Receive a series of messages.
It will continue to receive messages until the
shouldIgnore predicate returns
false or the idle
timeout is met (disabled by default) or the overall
maximum duration is elapsed or expected messages count is reached.
If a message that isn't of type
T the parameter
shouldIgnoreOtherMessageTypes
declares if the message should be ignored or not.
Returns the sequence of messages.
Note that it is not an error to hit the `max` duration in this case.
The max duration is scaled by
Dilated(TimeSpan)
Namespace:
Akka.TestKit
Assembly:
Akka.TestKit (in Akka.TestKit.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public IReadOnlyList<T> ReceiveWhile<T>(
Predicate<T> shouldIgnore,
Nullable<TimeSpan> max = null,
Nullable<TimeSpan> idle = null,
int msgs = 2147483647,
bool shouldIgnoreOtherMessageTypes = true
)
where T : class
member ReceiveWhile :
shouldIgnore : Predicate<'T> *
?max : Nullable<TimeSpan> *
?idle : Nullable<TimeSpan> *
?msgs : int *
?shouldIgnoreOtherMessageTypes : bool
(* Defaults:
let _max = defaultArg max null
let _idle = defaultArg idle null
let _msgs = defaultArg msgs 2147483647
let _shouldIgnoreOtherMessageTypes = defaultArg shouldIgnoreOtherMessageTypes true
*)
-> IReadOnlyList<'T> when 'T : not struct
Parameters
- shouldIgnore
- Type: SystemPredicateT
TBD - max (Optional)
- Type: SystemNullableTimeSpan
TBD - idle (Optional)
- Type: SystemNullableTimeSpan
TBD - msgs (Optional)
- Type: SystemInt32
TBD - shouldIgnoreOtherMessageTypes (Optional)
- Type: SystemBoolean
TBD
Type Parameters
- T
- TBD
Return Value
Type:
IReadOnlyListTTBD
See Also