Show / Hide Table of Contents

Interface IRoleBasedScenario

A scenario that runs its roles until the stop conditions are met.

Inherited Members
IScenario.Name
IScenario.Type
IScenario.NumDevicesAssigned
IScenario.AssignedDevices
IScenario.NumDevicesRequired
IScenario.IsConcurrent
IScenario.Status
IScenario.Update(OvermindState)
IScenario.FlagFailedIfUnfinished(OvermindState)
IEquatable<IScenario>.Equals(IScenario)
IBasedOn<IScenario>.BasedOn
IBasedOn<IScenario>.BasedOnObject
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public interface IRoleBasedScenario : IScenario, IEquatable<IScenario?>, IBasedOn<IScenario>, IBasedOn

Properties

View Source

AssignedRoles

Gets a mapping from device to its assigned role.

Declaration
IDictionary<IDevice, IRole> AssignedRoles { get; }
Property Value
Type Description
IDictionary<IDevice, IRole>
View Source

Roles

Gets the roles.

Declaration
IReadOnlyCollection<IRole> Roles { get; }
Property Value
Type Description
IReadOnlyCollection<IRole>
View Source

StopAfter

Gets the collection of requirements indicating when to stop the scenario.

Declaration
IReadOnlyCollection<IRequirement> StopAfter { get; }
Property Value
Type Description
IReadOnlyCollection<IRequirement>

Methods

View Source

AddRequirement(IRequirement)

Adds a requirement to the collection indicating when to stop the scenario.

Declaration
void AddRequirement(IRequirement requirement)
Parameters
Type Name Description
IRequirement requirement

The requirement.

View Source

AddRole(IRole)

Adds a role to the collection.

Declaration
void AddRole(IRole role)
Parameters
Type Name Description
IRole role

The role.

View Source

ClearRequirements()

Clears the requirements.

Declaration
void ClearRequirements()
View Source

RemoveRequirement(IRequirement)

Removes a requirement from the collection indicating when to stop the scenario.

Declaration
void RemoveRequirement(IRequirement requirement)
Parameters
Type Name Description
IRequirement requirement

The requirement.

View Source

RemoveRole(IRole)

Removes a role from the collection.

Declaration
void RemoveRole(IRole role)
Parameters
Type Name Description
IRole role

The role.

View Source

TryAssignAsync(OvermindState, DeviceState)

Tries to assign a device to the scenario.

Declaration
Task<bool> TryAssignAsync(OvermindState state, DeviceState subbot)
Parameters
Type Name Description
OvermindState state

The overmind state.

DeviceState subbot

The overmind device bot.

Returns
Type Description
Task<bool>

A Task representing the asynchronous operation.

View Source

Unassign(OvermindState, IDevice)

Removes a device from the scenario.

Declaration
void Unassign(OvermindState state, IDevice device)
Parameters
Type Name Description
OvermindState state

The overmind state.

IDevice device

The overmind device.

Extension Methods

IScenarioExtensions.HasEnoughDevices(IScenario)
IScenarioExtensions.IsActive(IScenario)
IScenarioExtensions.IsFinished(IScenario)
  • View Source
In this article
Back to top Generated by DocFX