<PackageReference Include="Polly.Core" Version="8.0.0-alpha.2" />

ResilienceContext

public sealed class ResilienceContext
A context assigned to a single execution of ResilienceStrategy. It is created manually or automatically when the user calls the various extensions on top of ResilienceStrategy. After every execution the context should be discarded and returned to the pool.
public CancellationToken CancellationToken { get; set; }

Gets or sets the CancellationToken associated with the execution.

public bool ContinueOnCapturedContext { get; set; }

Gets or sets a value indicating whether the execution should continue on the captured context.

public bool IsSynchronous { get; }

Gets a value indicating whether the execution is synchronous.

public bool IsVoid { get; }

Gets a value indicating whether the execution represents a void result.

Gets the custom properties attached to the context.

Gets the collection of resilience events that occurred while executing the resilience strategy.

public Type ResultType { get; }

Gets the type of the result associated with the execution.

public static ResilienceContext Get()

Gets a ResilienceContext instance from the pool.

public static void Return(ResilienceContext context)

Returns a context back to the pool.