Interface ITestOperationState<T>
Represents the execution status of a test operation run created with CreateState().
Mostly intended for internal use.
Inherited Members
Namespace: Responsible.State
Assembly: Responsible.dll
Syntax
public interface ITestOperationState<out T> : ITestOperationState
Type Parameters
Name | Description |
---|---|
T | Return type of the test operation. |
Remarks
All implementations of ITestOperationState<T> in Responsible
have an override of ToString()
,
which will produce a full textual representation of the execution state.
Methods
ExecuteUnsafe<TResult>(RunContext, CancellationToken)
Starts execution of the the operation this state was created from.
Intended for internal use only.
Declaration
Task<TResult> ExecuteUnsafe<TResult>(RunContext runContext, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
RunContext | runContext | The test operation run context this run is part of. |
CancellationToken | cancellationToken | Cancellation token for canceling the run. |
Returns
Type | Description |
---|---|
Task<TResult> | An task, which will complete with the result of the operation, or an error on failure. |
Type Parameters
Name | Description |
---|---|
TResult |
Remarks
Due to lack of support for covariant generic classes and constraints in C#, we have to use this unsafe method. However, it is used only from an extension method, which does the correct type inference for us, so overall, things are safe.