35 lines
No EOL
1.1 KiB
JavaScript
35 lines
No EOL
1.1 KiB
JavaScript
"use strict";
|
|
/**
|
|
* @module botbuilder
|
|
*/
|
|
/**
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.ComponentRegistration = void 0;
|
|
/**
|
|
* ComponentRegistration is a signature class for discovering assets from components.
|
|
*/
|
|
class ComponentRegistration {
|
|
/**
|
|
* Gets list of all ComponentRegistration objects registered.
|
|
*
|
|
* @returns A list of ComponentRegistration objects.
|
|
*/
|
|
static get components() {
|
|
return Array.from(ComponentRegistration._components.values());
|
|
}
|
|
/**
|
|
* Add a component, only one instance per type is allowed for components.
|
|
*
|
|
* @param componentRegistration The component to be registered.
|
|
*/
|
|
static add(componentRegistration) {
|
|
const name = componentRegistration.constructor.name;
|
|
ComponentRegistration._components.set(name, componentRegistration);
|
|
}
|
|
}
|
|
exports.ComponentRegistration = ComponentRegistration;
|
|
ComponentRegistration._components = new Map();
|
|
//# sourceMappingURL=componentRegistration.js.map
|