BotConfiguration Class

Definition

Caution

This class is deprecated. See https://aka.ms/bot-file-basics for more information.

BotConfiguration represents configuration information for a bot.

[System.Obsolete("This class is deprecated.  See https://aka.ms/bot-file-basics for more information.", false)]
public class BotConfiguration
[<System.Obsolete("This class is deprecated.  See https://aka.ms/bot-file-basics for more information.", false)>]
type BotConfiguration = class
Public Class BotConfiguration
Inheritance
BotConfiguration
Attributes

Remarks

It is typically loaded from a .bot file on disk. This class implements methods for encrypting and manipulating the in memory representation of the configuration.

Constructors

BotConfiguration()

Properties

Description

Gets or sets description of the bot.

Name

Gets or sets name of the bot.

Padlock

Gets or sets padlock - Used to validate that the secret is consistent for all encrypted fields.

Properties

Gets or sets properties that are not otherwise defined.

Services

Gets or sets connected services.

Version

Gets or sets the version.

Methods

ClearSecret()

Clear secret.

ConnectService(ConnectedService)

Connect a service to the bot file.

Decrypt(String)

Decrypt all values in the in memory config.

DisconnectService(String)

Remove a service by its ID.

DisconnectServiceByNameOrId(String)

Remove a service by its name or ID.

DisconnectServiceByNameOrId<T>(String)

Remove a specific type of service by its name or ID.

Encrypt(String)

Encrypt all values in the in memory config.

FindService(String)

Find a service by ID.

FindServiceByNameOrId(String)

Find a service by its name or ID.

FindServiceByNameOrId<T>(String)

Find a specific type of service by its name or ID.

GenerateKey()

Generate a new key suitable for encrypting.

Load(String, String)

Load the configuration from a .bot file.

LoadAsync(String, String)

Load the configuration from a .bot file.

LoadFromFolder(String, String)

Load the bot configuration by looking in a folder and loading the first .bot file in the folder.

LoadFromFolderAsync(String, String)

Load the bot configuration by looking in a folder and loading the first .bot file in the folder.

MigrateData()

migrate old records to new records.

Save(String)

Save the file with secret.

SaveAs(String, String)

Save the configuration to a .bot file.

SaveAsAsync(String, String)

Save the configuration to a .bot file.

SaveAsync(String)

Save the file with secret.

ValidateSecret(String)

Make sure secret is correct by decrypting the secretKey with it.

Extension Methods

IsProjectNameSpaceless(BotConfiguration, String)

Check if the Project's Name contains white spaces.

ValidateLuisKeyExistence(BotConfiguration)

Checks if the LuisService has its key defined.

ValidateQnAKeyExistence(BotConfiguration)

Checks if the QnAMakerService has its key defined.

Applies to