Interface IRoleBasedScenario
A scenario that runs its roles until the stop conditions are met.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public interface IRoleBasedScenario : IScenario, IEquatable<IScenario?>, IBasedOn<IScenario>, IBasedOn
Properties
View SourceAssignedRoles
Gets a mapping from device to its assigned role.
Declaration
IDictionary<IDevice, IRole> AssignedRoles { get; }
Property Value
Type | Description |
---|---|
IDictionary<IDevice, IRole> |
Roles
Gets the roles.
Declaration
IReadOnlyCollection<IRole> Roles { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IRole> |
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 SourceAddRequirement(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. |
AddRole(IRole)
Adds a role to the collection.
Declaration
void AddRole(IRole role)
Parameters
Type | Name | Description |
---|---|---|
IRole | role | The role. |
ClearRequirements()
Clears the requirements.
Declaration
void ClearRequirements()
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. |
RemoveRole(IRole)
Removes a role from the collection.
Declaration
void RemoveRole(IRole role)
Parameters
Type | Name | Description |
---|---|---|
IRole | role | The role. |
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. |
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. |