Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API naming for LG #1883

Merged
merged 7 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
618 changes: 618 additions & 0 deletions libraries/botbuilder-core/src/activityFactory.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions libraries/botbuilder-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

export * from 'botframework-schema';
export * from './activityFactory';
export * from './appCredentials';
export * from './activityHandler';
export * from './activityHandlerBase';
Expand Down
8 changes: 4 additions & 4 deletions libraries/botbuilder-lg/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ For NodeJS, add botbuilder-lg
Load the template manager with your .lg file

```typescript
let lgFile = new LGParser.parseFile(filePath, importResolver?, expressionParser?);
let templates = new Templates.parseFile(filePath, importResolver?, expressionParser?);
```

When you need template expansion, call the LGFile and pass in the relevant template name
When you need template expansion, call the templates and pass in the relevant template name

```typescript
await turnContext.sendActivity(lgFile.evaluateTemplate("<TemplateName>", entitiesCollection));
await turnContext.sendActivity(templates.evaluate("<TemplateName>", entitiesCollection));
```

If your template needs specific entity values to be passed for resolution/ expansion, you can pass them in on the call to `evaluateTemplate`

```typescript
await turnContext.sendActivity(lgFile.evaluateTemplate("WordGameReply", { GameName = "MarcoPolo" } ));
await turnContext.sendActivity(templates.evaluate("WordGameReply", { GameName = "MarcoPolo" } ));
```

[1]:https://github.com/Microsoft/BotBuilder/blob/master/specs/botframework-activity/botframework-activity.md
Expand Down
320 changes: 0 additions & 320 deletions libraries/botbuilder-lg/src/activityChecker.ts

This file was deleted.

Loading