Show / Hide Table of Contents

Interface IBrainSerializer

An interface used to save and load bot brains.

Inherited Members
IMetadataAccess.ParameterNames
IMetadataAccess.GetParameterMetadata(string)
ITitleResourceHelper.GetTitleResourcePath(string)
IResourceHelper.GetResourcePath(string)
Namespace: Microsoft.XboxStudios.BotBrain.Composition
Assembly: BotBrain.Abstractions.dll
Syntax
public interface IBrainSerializer : IMetadataAccess, ITitleResourceHelper, IResourceHelper

Properties

View Source

BotBrainFileExtension

Gets the file extension for bot brain files.

Declaration
string BotBrainFileExtension { get; }
Property Value
Type Description
string
View Source

BrainsFolder

Gets or sets the path to the folder containing bot brain files.

Declaration
string BrainsFolder { get; set; }
Property Value
Type Description
string

Methods

View Source

DeserializeBrain(string)

Deserializes a brain from a string.

Declaration
IBotBrain DeserializeBrain(string contents)
Parameters
Type Name Description
string contents

A string representation of a brain.

Returns
Type Description
IBotBrain

The brain.

View Source

Initialize()

Initializes the brain serializer.

Declaration
void Initialize()
View Source

IsReservedBrainFilename(string)

Determines if the given filename is reserved for brain metadata like defaults or parameters.

Declaration
bool IsReservedBrainFilename(string filename)
Parameters
Type Name Description
string filename

The filename.

Returns
Type Description
bool

True if it is reserved.

View Source

LoadBrain(string)

Loads a brain instance.

Declaration
IBotBrain? LoadBrain(string name)
Parameters
Type Name Description
string name

The brain name.

Returns
Type Description
IBotBrain

The brain.

View Source

LoadDefaultBrainParameters()

Loads the default brain parameters.

Declaration
IParameterManager? LoadDefaultBrainParameters()
Returns
Type Description
IParameterManager

The default parameters, or null if they don't exist.

View Source

SerializeBrain(IBotBrain, bool)

Serializes a brain to a string.

Declaration
string SerializeBrain(IBotBrain brain, bool indented = true)
Parameters
Type Name Description
IBotBrain brain

The brain.

bool indented

If true, the output is indented.

Returns
Type Description
string

A string representation of a brain.

  • View Source
In this article
Back to top Generated by DocFX