Show / Hide Table of Contents

Class ConsiderationBase

A base class used to implement IConsideration<TState, TBot, TAction> given parameters for curve type and maximum value.

Inheritance
object
ConsiderationBase
ConsiderationBase<TState, TBot, TAction>
Implements
IConsideration
IEquatable<IConsideration>
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.BotBrain.Considerations
Assembly: BotBrain.Core.dll
Syntax
[DataContract]
public abstract class ConsiderationBase : IConsideration, IEquatable<IConsideration>

Constructors

View Source

ConsiderationBase(string?, ILogger<ConsiderationBase>?)

Initializes a new instance of the ConsiderationBase class.

Declaration
protected ConsiderationBase(string? name = null, ILogger<ConsiderationBase>? logger = null)
Parameters
Type Name Description
string name

The consideration name.

ILogger<ConsiderationBase> logger

The logger to use.

Properties

View Source

Brain

Gets or sets the brain using this consideration.

Declaration
public IBotBrain? Brain { get; set; }
Property Value
Type Description
IBotBrain
View Source

Logger

Gets the logger for the consideration.

Declaration
[IgnoreDataMember]
protected ILogger Logger { get; }
Property Value
Type Description
ILogger
View Source

Name

Gets or sets the consideration name.

Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type Description
string
View Source

Type

Gets the type name of the consideration.

Declaration
[DataMember]
public string Type { get; }
Property Value
Type Description
string

Methods

View Source

Equals(IConsideration?)

Determines whether the specified consideration is equal to this one.

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

The consideration to compare to.

Returns
Type Description
bool

True if the considerations are equal.

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

GetCurve(IHasParameters, Func<string, IEnumerable<string>>, out Curve)

Gets the curve parameters.

Declaration
public bool GetCurve(IHasParameters hasParameters, Func<string, IEnumerable<string>> getParameterNames, out Curve curve)
Parameters
Type Name Description
IHasParameters hasParameters

The object containing parameter values.

Func<string, IEnumerable<string>> getParameterNames

Given an unqualified parameter name, returns all possible names.

Curve curve

Used to store the parameter value.

Returns
Type Description
bool

True if the parameters were valid.

View Source

GetCurve(IParameterManager, Func<string, IEnumerable<string>>, out Curve)

Gets the curve parameters.

Declaration
public bool GetCurve(IParameterManager parameters, Func<string, IEnumerable<string>> getParameterNames, out Curve curve)
Parameters
Type Name Description
IParameterManager parameters

The parameter values.

Func<string, IEnumerable<string>> getParameterNames

Given an unqualified parameter name, returns all possible names.

Curve curve

Used to store the parameter value.

Returns
Type Description
bool

True if the parameters were valid.

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

GetSignificance(IHasParameters, Func<string, IEnumerable<string>>, out double)

Gets the significance parameter.

Declaration
public bool GetSignificance(IHasParameters hasParameters, Func<string, IEnumerable<string>> getParameterNames, out double significance)
Parameters
Type Name Description
IHasParameters hasParameters

The object containing parameter values.

Func<string, IEnumerable<string>> getParameterNames

Given an unqualified parameter name, returns all possible names.

double significance

Used to store the parameter value.

Returns
Type Description
bool

True if the parameter was valid.

View Source

GetSignificance(IParameterManager, Func<string, IEnumerable<string>>, out double)

Gets the significance parameter.

Declaration
public bool GetSignificance(IParameterManager parameters, Func<string, IEnumerable<string>> getParameterNames, out double significance)
Parameters
Type Name Description
IParameterManager parameters

The parameter values.

Func<string, IEnumerable<string>> getParameterNames

Given an unqualified parameter name, returns all possible names.

double significance

Used to store the parameter value.

Returns
Type Description
bool

True if the parameter was valid.

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()

Implements

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