Show / Hide Table of Contents

Class RoleBase

Base class for roles.

Inheritance
object
RoleBase
RunBrainRole
Implements
IRole
IEquatable<IRole>
IBasedOn<IRole>
IBasedOn
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 RoleBase : IRole, IEquatable<IRole>, IBasedOn<IRole>, IBasedOn, IMetadataAccess

Constructors

View Source

RoleBase(string?, int, string?)

Initializes a new instance of the RoleBase class.

Declaration
protected RoleBase(string? name = null, int numDevices = 1, string? basedOn = null)
Parameters
Type Name Description
string name

The role name.

int numDevices

The number of devices to assign to this role.

string basedOn

The name of the template to base the role on.

Fields

View Source

DefaultNumDevices

The default number of devices.

Declaration
public const int DefaultNumDevices = 1
Field Value
Type Description
int

Properties

View Source

BasedOn

Gets the name of the template this object is based on.

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

BasedOnObject

Gets or sets the template this object is based on.

Declaration
[JsonIgnore]
public IRole? BasedOnObject { get; set; }
Property Value
Type Description
IRole
View Source

Name

Gets the role name.

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

NumDevices

Gets the number of devices that should be assigned this role.

Declaration
public int NumDevices { get; set; }
Property Value
Type Description
int
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(IRole?)

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

Declaration
public virtual bool Equals(IRole? other)
Parameters
Type Name Description
IRole 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

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

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