Specifies a timeout value.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public static IRetryOptions WithTimeout( TimeSpan timeout ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function WithTimeout ( _ timeout As TimeSpan _ ) As IRetryOptions |
Parameters
- timeout
- Type: System..::.TimeSpan
The timeout value, or a negative value to specify no timeout value. A value of zero, will let the condition to be evaluated only once.
Return Value
An instance to specify other options for the retry operation.
Remarks
The retry operation fails if the overall duration exceeds the specified timeout value.
If not specified, the default timeout value is set to 10 seconds.
Exceptions
| Exception | Condition |
|---|---|
| System..::.InvalidOperationException | Thrown if the option was called more than once. |
