 | timeout.TimeOut<T> Method (Func<T>, TimeSpan, T) |
Namespace:
WhetStone.Processes
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntaxpublic static bool TimeOut<T>(
this Func<T> action,
TimeSpan maxtime,
out T result
)
Parameters
- action
- Type: System.Func<T>
The Func< TResult> to invoke. - maxtime
- Type: System.TimeSpan
The timeout to cancel action if exceeded. - result
- Type: T
The output of action.
Type Parameters
- T
Return Value
Type:
BooleanWhether the action completed within the allotted time.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Func<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also