• Home
  • .NET
  • Unity
  • Godot
  • Design Overview
  • API Documentation
  • Changelog
  • GitHub
Show / Hide Table of Contents
  • Responsible
    • BddExtensions
    • IExternalResultSource
    • IFailureListener
    • IGlobalContextProvider
    • IOptionalTestResponder
    • ITestInstruction<T>
    • ITestOperation<T>
    • ITestResponder<T>
    • ITestScheduler
    • ITestWaitCondition<T>
    • LinqSupport
    • OptionalTestResponder
    • RepetitionLimitExceededException
    • Responsibly
    • TestFailureException
    • TestInstruction
    • TestInstructionExecutor
    • TestInstructionExecutor.StateNotificationCallback
    • TestOperationState
    • TestResponder
    • TestWaitCondition
  • Responsible.Bdd
    • IBddStep
    • Keywords
    • ScenarioBuilder
  • Responsible.Context
    • RunContext
  • Responsible.Docs
    • Inherit
  • Responsible.State
    • ITestOperationState
    • ITestOperationState<T>
    • StateStringBuilder
    • TestOperationStateTransition
    • TestOperationStatus
  • Responsible.Unity
    • TestOperationYieldInstruction<T>
    • UnhandledLogMessageException
    • UnityErrorLogInterceptor
    • UnityFailureListener
    • UnityTestInstructionExecutor
    • UnityTestScheduler
  • Responsible.Utilities
    • IMultipleTaskAwaiter<T>
    • IMultipleTaskSource<T>
    • IndentedStringBuilder<T>
    • RetryingPoller

Class RetryingPoller

Keeps a list of callbacks, and calls them repeatedly, until the list doesn't change during the calls.

Inheritance
object
RetryingPoller
Namespace: Responsible.Utilities
Assembly: Responsible.dll
Syntax
public class RetryingPoller
Remarks

May be used to build your own TestInstructionExecutor. The behavior provided by this class is intended for running tests as fast as possible, assuming polling is a relatively cheap operation to execute, and that executing some operations may complete other wait conditions.

The implementation focuses on simplicity (of code) over performance. It's unlikely to become a performance bottleneck, but if this does happen for you, please consider opening an issue or contributing code for a more performant poller.

Methods

Poll()

Calls all the registered callbacks at least once, and keeps calling them until none of the callbacks end up unregistering old callbacks or registering new callbacks.

Declaration
public void Poll()

RegisterPollCallback(Action)

Registers a callback to be called at least once when Poll() is called.

Declaration
public IDisposable RegisterPollCallback(Action action)
Parameters
Type Name Description
Action action

Callback to be called

Returns
Type Description
IDisposable

A disposable, which will remove this callback when disposed.

In this article
Back to top Generated by DocFX