Show / Hide Table of Contents

Class AutomationQueue<TAction>

An implementation of a bot action queue.

Inheritance
object
List<TAction>
AutomationQueue<TAction>
Implements
IList<TAction>
ICollection<TAction>
IReadOnlyList<TAction>
IReadOnlyCollection<TAction>
IEnumerable<TAction>
IList
ICollection
IEnumerable
IDisposable
Inherited Members
List<TAction>.Add(TAction)
List<TAction>.AddRange(IEnumerable<TAction>)
List<TAction>.AsReadOnly()
List<TAction>.BinarySearch(int, int, TAction, IComparer<TAction>)
List<TAction>.BinarySearch(TAction)
List<TAction>.BinarySearch(TAction, IComparer<TAction>)
List<TAction>.Clear()
List<TAction>.Contains(TAction)
List<TAction>.ConvertAll<TOutput>(Converter<TAction, TOutput>)
List<TAction>.CopyTo(int, TAction[], int, int)
List<TAction>.CopyTo(TAction[])
List<TAction>.CopyTo(TAction[], int)
List<TAction>.EnsureCapacity(int)
List<TAction>.Exists(Predicate<TAction>)
List<TAction>.Find(Predicate<TAction>)
List<TAction>.FindAll(Predicate<TAction>)
List<TAction>.FindIndex(int, int, Predicate<TAction>)
List<TAction>.FindIndex(int, Predicate<TAction>)
List<TAction>.FindIndex(Predicate<TAction>)
List<TAction>.FindLast(Predicate<TAction>)
List<TAction>.FindLastIndex(int, int, Predicate<TAction>)
List<TAction>.FindLastIndex(int, Predicate<TAction>)
List<TAction>.FindLastIndex(Predicate<TAction>)
List<TAction>.ForEach(Action<TAction>)
List<TAction>.GetEnumerator()
List<TAction>.GetRange(int, int)
List<TAction>.IndexOf(TAction)
List<TAction>.IndexOf(TAction, int)
List<TAction>.IndexOf(TAction, int, int)
List<TAction>.Insert(int, TAction)
List<TAction>.InsertRange(int, IEnumerable<TAction>)
List<TAction>.LastIndexOf(TAction)
List<TAction>.LastIndexOf(TAction, int)
List<TAction>.LastIndexOf(TAction, int, int)
List<TAction>.Remove(TAction)
List<TAction>.RemoveAll(Predicate<TAction>)
List<TAction>.RemoveAt(int)
List<TAction>.RemoveRange(int, int)
List<TAction>.Reverse()
List<TAction>.Reverse(int, int)
List<TAction>.Sort()
List<TAction>.Sort(IComparer<TAction>)
List<TAction>.Sort(Comparison<TAction>)
List<TAction>.Sort(int, int, IComparer<TAction>)
List<TAction>.ToArray()
List<TAction>.TrimExcess()
List<TAction>.TrueForAll(Predicate<TAction>)
List<TAction>.Capacity
List<TAction>.Count
List<TAction>.this[int]
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain.Operations
Assembly: BotBrain.Operations.dll
Syntax
public class AutomationQueue<TAction> : List<TAction>, IList<TAction>, ICollection<TAction>, IReadOnlyList<TAction>, IReadOnlyCollection<TAction>, IEnumerable<TAction>, IList, ICollection, IEnumerable, IDisposable
Type Parameters
Name Description
TAction

The bot action type.

Properties

View Source

CurrentAction

Gets or sets the current action.

Declaration
public TAction CurrentAction { get; set; }
Property Value
Type Description
TAction
View Source

CurrentIndex

Gets or sets the index of the current action in the queue.

Declaration
public int CurrentIndex { get; set; }
Property Value
Type Description
int

Methods

View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
View Source

Reset()

Resets the bot's action queue.

Declaration
public Task Reset()
Returns
Type Description
Task

A task that completes once the bot is reset.

View Source

SafeModifyActions(Action)

Modifies the action queue, using a semaphore for safety.

Declaration
public Task SafeModifyActions(Action action)
Parameters
Type Name Description
Action action

The action.

Returns
Type Description
Task

A task.

View Source

SafeModifyActions(Func<CancellationToken, Task>, CancellationToken)

Modifies the action queue, using a semaphore for safety.

Declaration
public Task SafeModifyActions(Func<CancellationToken, Task> action, CancellationToken token = default)
Parameters
Type Name Description
Func<CancellationToken, Task> action

The action.

CancellationToken token

A token to monitor for cancellation.

Returns
Type Description
Task

A task.

View Source

SetActions(IEnumerable<TAction>)

Sets the action queue.

Declaration
public Task SetActions(IEnumerable<TAction> actions)
Parameters
Type Name Description
IEnumerable<TAction> actions

The actions.

Returns
Type Description
Task

A task.

Implements

IList<T>
ICollection<T>
IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IList
ICollection
IEnumerable
IDisposable

Extension Methods

ICollectionExtensions.GetNearestIndex<T>(ICollection<T>, int)
ICollectionExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
ICollectionExtensions.ForEach<T>(ICollection<T>, Action<T>)
ICollectionExtensions.SetRange<T>(ICollection<T>, IEnumerable<T>)
IEnumerableExtensions.WithoutLast<T>(IEnumerable<T>)
IListExtensions.RandomChoice<T>(IList<T>, Random?)
IListExtensions.IndicesOf<T>(IList<T>, IEnumerable<T>)
IListExtensions.Move<T>(IList<T>, int, int)
ICollectionExtensions.GetNearestIndex(ICollection, int)
IListExtensions.GetNearestItem(IList, int)
IListExtensions.IndicesOf(IList, IEnumerable?)
IListExtensions.OrderBy(IList, IList)
  • View Source
In this article
Back to top Generated by DocFX