Show / Hide Table of Contents

Class BotBrainLoop

A loop to handle updating bot brains.

Inheritance
object
BotBrainLoop
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.Shared.dll
Syntax
public class BotBrainLoop
Remarks

Initializes a new instance of the BotBrainLoop class.

Constructors

View Source

BotBrainLoop(IBrainUpdater, TimeSpan, Action<Exception>)

A loop to handle updating bot brains.

Declaration
public BotBrainLoop(IBrainUpdater brainUpdater, TimeSpan tick, Action<Exception> handleError)
Parameters
Type Name Description
IBrainUpdater brainUpdater

The brain updater.

TimeSpan tick

The loop interval.

Action<Exception> handleError

An action to handle exceptions from the loop.

Remarks

Initializes a new instance of the BotBrainLoop class.

Properties

View Source

DelayBeforeAbortingBrainLoop

Gets the amount of time to wait before aborting the brain thread, if it doesn't respond to the stop request.

Declaration
protected virtual TimeSpan DelayBeforeAbortingBrainLoop { get; }
Property Value
Type Description
TimeSpan
View Source

IsRunning

Gets a value indicating whether or not the loop is running.

Declaration
public bool IsRunning { get; }
Property Value
Type Description
bool

Methods

View Source

Start()

Starts the bot brain loop, if it isn't already started.

Declaration
public void Start()
View Source

StopAsync(TimeSpan?)

Stops the brain loop.

Declaration
public Task StopAsync(TimeSpan? delayBeforeAbort = null)
Parameters
Type Name Description
TimeSpan? delayBeforeAbort

Maximum amount of time to wait.

Returns
Type Description
Task

A task.

  • View Source
In this article
Back to top Generated by DocFX