Show / Hide Table of Contents

Class RequirementBase

Base class for requirements.

Inheritance
object
RequirementBase
ActionFinishedCondition
TotalTimeCondition
Implements
IRequirement
IEquatable<IRequirement>
IMetadataAccess
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public abstract class RequirementBase : IRequirement, IEquatable<IRequirement?>, IMetadataAccess

Constructors

View Source

RequirementBase(string?)

Initializes a new instance of the RequirementBase class.

Declaration
protected RequirementBase(string? name = null)
Parameters
Type Name Description
string name

The requirement name.

Properties

View Source

Name

Gets the requirement name.

Declaration
public string? Name { get; }
Property Value
Type Description
string
View Source

ParameterNames

Gets an enumeration of parameter names.

Declaration
[JsonIgnore]
public IEnumerable<string> ParameterNames { get; }
Property Value
Type Description
IEnumerable<string>
View Source

Type

Gets the type name.

Declaration
public string Type { get; }
Property Value
Type Description
string

Methods

View Source

CreateMetadata()

Used to create parameter metadata.

Declaration
protected virtual MetadataContainer CreateMetadata()
Returns
Type Description
MetadataContainer

A metadata container.

View Source

Equals(IRequirement?)

Indicates whether the current object is equal to another object of the same type.

Declaration
public virtual bool Equals(IRequirement? other)
Parameters
Type Name Description
IRequirement other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

View Source

Equals(object?)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj

The object to compare with the current object.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

Overrides
object.Equals(object)
View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
object.GetHashCode()
View Source

GetParameterMetadata(string)

Gets the metadata for a parameter.

Declaration
public ParameterMetadata? GetParameterMetadata(string parameterName)
Parameters
Type Name Description
string parameterName

The parameter name.

Returns
Type Description
ParameterMetadata

The metadata, if it exists.

View Source

OnStarted(IRoleBasedScenario, OvermindState)

Called when the scenario starts.

Declaration
public virtual void OnStarted(IRoleBasedScenario scenario, OvermindState state)
Parameters
Type Name Description
IRoleBasedScenario scenario

The scenario.

OvermindState state

The overmind state.

View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()
View Source

Update(IRoleBasedScenario, OvermindState)

Determines if the requirement is satisfied.

Declaration
public abstract bool Update(IRoleBasedScenario scenario, OvermindState state)
Parameters
Type Name Description
IRoleBasedScenario scenario

The scenario.

OvermindState state

The overmind state.

Returns
Type Description
bool

True if it's satisfied.

Implements

IRequirement
IEquatable<T>
IMetadataAccess
  • View Source
In this article
Back to top Generated by DocFX