Show / Hide Table of Contents

Class ConcurrentInstructions

Runs one or more instructions at the same time. This instruction completes when all added instructions have finished.

Inheritance
object
UpdateComponent
InstructionBase
ConcurrentInstructions
Implements
IComponent
Inherited Members
InstructionBase.OnFinished(IScreenObject)
InstructionBase.OnRepeating()
InstructionBase.OnStarted()
InstructionBase.RemoveOnFinished
InstructionBase.IsFinished
InstructionBase.RepeatCount
InstructionBase.Started
InstructionBase.Finished
InstructionBase.Repeating
UpdateComponent.OnAdded(IScreenObject)
UpdateComponent.OnRemoved(IScreenObject)
UpdateComponent.SortOrder
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.Instructions
Assembly: SadConsole.dll
Syntax
public class ConcurrentInstructions : InstructionBase, IComponent

Constructors

ConcurrentInstructions(IEnumerable<InstructionBase>)

Creates a new instruction that runs the provided instructions concurrently.

Declaration
public ConcurrentInstructions(IEnumerable<InstructionBase> instructions)
Parameters
Type Name Description
IEnumerable<InstructionBase> instructions

The instructions

Properties

Instructions

The instructions to run concurrently.

Declaration
public IEnumerable<InstructionBase> Instructions { get; set; }
Property Value
Type Description
IEnumerable<InstructionBase>

Methods

Repeat()

Repeats the current instruction. Decrements the RepeatCount value (if applicable), and raises the Repeating event. This method should be overridden in derived classes to customize how the object is reset for a repeat.

Declaration
public override void Repeat()
Overrides
InstructionBase.Repeat()

Reset()

Resets the Done flag.

Declaration
public override void Reset()
Overrides
InstructionBase.Reset()
Remarks

On the base class, resets the IsFinished to false. Override this method to reset the derived class' counters and status flags for the instruction.

Update(IScreenObject, TimeSpan)

Executes the instruction. This base class method should be called from derived classes. If the IsFinished property is set to true, will try to repeat if needed and will raise all appropriate events.

Declaration
public override void Update(IScreenObject componentHost, TimeSpan delta)
Parameters
Type Name Description
IScreenObject componentHost

The object that hosts this instruction.

TimeSpan delta

The time that has elapsed since this method was last called.

Overrides
InstructionBase.Update(IScreenObject, TimeSpan)

Implements

IComponent

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX