Edit

Share via


botbuilder-dialogs-adaptive-runtime package

Classes

Configuration

Configuration implements the IConfiguration interface and adds helper methods for setting values, layering sources, and getting type checked values.

ConfigurationResourceExporer

Class which gives access to content resources by specifying configuration and declarativeTypes.

CoreBot

Implements an instance of CoreBot.

CoreBotAdapter

An adapter that implements the Core Bot and can be hosted in different cloud environments both public and private.

Functions

getRuntimeServices(string, string)

Construct all runtime services.

getRuntimeServices(string, Configuration)

Construct all runtime services.

Function Details

getRuntimeServices(string, string)

Construct all runtime services.

function getRuntimeServices(applicationRoot: string, settingsDirectory: string): Promise<[ServiceCollection, Configuration]>

Parameters

applicationRoot

string

absolute path to root of application

settingsDirectory

string

directory where settings files are located

Returns

Promise<[ServiceCollection, Configuration]>

service collection and configuration

Remarks

While the full set of dependencies is designed to be sufficient to run Adaptive Dialogs, the "bot" dependency can actually be any ActivityHandler implementation and is not constrained to one that uses Adaptive Dialogs. Any Bot Framework project can therefore be simplified by just using this function along with a custom ActivityHandler implementation.

Aspects of the behavior of a number of these dependencies, including those that can be overriden, can be controlled through configuration.

The default ResourceExplorer uses the file system. The applicationRoot folder is used as the root directory.

If not overridden, the exact type of Storage added depends on configuration. With no configuration, the default is memory storage. It should be noted that MemoryStorage is designed primarily for testing with a single host running the bot and no durable storage.

The default Skills implementation can be constrained in terms of allowed callers through configuration. Refer to the product documentation for further details.

The default BotTelemetryClient implementation uses AppInsights and aspects of what is included in the telemetry data recorded can be controller through configuration. Refer to the product documentation for further details.

A number of the features of the runtime are implemented through middleware. Various feature flags in configuration determine whether these middleware are added at runtime, the settings include: UseInspection, ShowTyping and SetSpeak.

These control the addition of: InspectionMiddleware, ShowTypingMiddleware, and SetSpeakMiddleware respectively.

getRuntimeServices(string, Configuration)

Construct all runtime services.

function getRuntimeServices(applicationRoot: string, configuration: Configuration): Promise<[ServiceCollection, Configuration]>

Parameters

applicationRoot

string

absolute path to root of application

configuration
Configuration

a fully initialized configuration instance to use

Returns

Promise<[ServiceCollection, Configuration]>

service collection and configuration