 | timeoutTimeOutT Method (FuncT, TimeSpan, T) |
Perform an
FuncTResult, or cancel it if it exceeds a timeout.
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: SystemFuncT
The FuncTResult to invoke. - maxtime
- Type: SystemTimeSpan
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
FuncT. 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