Class WaitUtils
Inheritance
System.Object
WaitUtils
Assembly: Eco.Core.dll
Syntax
public static class WaitUtils : Object
Methods
WaitForCondition(Func<Boolean>, TimeSpan, TimeSpan, CancellationToken)
Declaration
public static Task<bool> WaitForCondition(Func<bool> predicate, TimeSpan timeout, TimeSpan checkInterval, CancellationToken token = null)
Parameters
Type |
Name |
Description |
System.Func<System.Boolean> |
predicate |
|
System.TimeSpan |
timeout |
|
System.TimeSpan |
checkInterval |
|
System.Threading.CancellationToken |
token |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
WaitForObject<T>(Func<T>, TimeSpan, TimeSpan, CancellationToken)
Declaration
public static Task<T> WaitForObject<T>(Func<T> producer, TimeSpan timeout, TimeSpan checkInterval, CancellationToken token = null)
where T : class
Parameters
Type |
Name |
Description |
System.Func<T> |
producer |
|
System.TimeSpan |
timeout |
|
System.TimeSpan |
checkInterval |
|
System.Threading.CancellationToken |
token |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters