Skip to content

Commit 7f5ca77

Browse files
authored
Community content (#1276)
1 parent 027ae49 commit 7f5ca77

File tree

4 files changed

+4
-56
lines changed

4 files changed

+4
-56
lines changed

articles/dotnet/bot-builder-dotnet-state.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -98,58 +98,6 @@ Each [Activity][Activity] object contains properties that you will use to manage
9898
> [!NOTE]
9999
> You may use these property values as keys even if you opt to store state data in your own database, rather than using the Bot Framework state data store.
100100
101-
## <a id="state-client"></a> Create a state client
102-
103-
The `StateClient` object enables you to manage state data using the Bot Framework SDK for .NET.
104-
If you have access to a message that belongs to the same context in which you want to manage state data, you can create a state client by calling the `GetStateClient` method on the `Activity` object.
105-
106-
[!code-csharp[Get State client](../includes/code/dotnet-state.cs#getStateClient1)]
107-
108-
If you do not have access to a message that belongs to the same context in which you want to manage state data, you can create a state client by simply creating a new instance of the `StateClient` class. In this example, `microsoftAppId` and `microsoftAppPassword` are the Bot Framework authentication credentials that you acquire for your bot during the [bot creation](../bot-service-quickstart.md) process.
109-
110-
> [!NOTE]
111-
> To find your bot's **AppID** and **AppPassword**, see [MicrosoftAppID and MicrosoftAppPassword](~/bot-service-manage-overview.md#microsoftappid-and-microsoftapppassword).
112-
113-
[!code-csharp[Get State client](../includes/code/dotnet-state.cs#getStateClient2)]
114-
115-
> [!NOTE]
116-
> The default state client is stored in a central service. For some channels, you may want to use a state API that is hosted within the channel itself, so that state data can be stored in a compliant store that the channel supplies.
117-
118-
## Get state data
119-
120-
Each of the "**Get...Data**" methods returns a `BotData` object that contains the state data for the specified user and/or conversation. To get a specific property value from a `BotData` object, call the `GetProperty` method.
121-
122-
The following code example shows how to get a typed property from user data.
123-
124-
[!code-csharp[Get state property](../includes/code/dotnet-state.cs#getProperty1)]
125-
126-
The following code example shows how to get a property from a complex type within user data.
127-
128-
[!code-csharp[Get state property](../includes/code/dotnet-state.cs#getProperty2)]
129-
130-
If no state data exists for the user and/or conversation that is specified for a "**Get...Data**" method call,
131-
the `BotData` object that is returned will contain these property values:
132-
- `BotData.Data` = null
133-
- `BotData.ETag` = "*"
134-
135-
## Save state data
136-
137-
To save state data, first get the `BotData` object by calling the appropriate "**Get...Data**" method,
138-
then update it by calling the `SetProperty` method for each property you want to update,
139-
and save it by calling the appropriate "**Set...Data**" method.
140-
141-
> [!NOTE]
142-
> You may store up to 32 kilobytes of data for each user on a channel, each conversation on a channel,
143-
> and each user within the context of a conversation on a channel.
144-
145-
The following code example shows how to save a typed property in user data.
146-
147-
[!code-csharp[Set state property](../includes/code/dotnet-state.cs#setProperty1)]
148-
149-
The following code example shows how to save a property in a complex type within user data.
150-
151-
[!code-csharp[Set state property](../includes/code/dotnet-state.cs#setProperty2)]
152-
153101
## Handle concurrency issues
154102

155103
Your bot may receive an error response with HTTP status code **412 Precondition Failed**

articles/javascript/bot-builder-javascript-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To create your bot and initialize its packages
4242
1. If you don't already have a directory for your JavaScript bots, create one and change directories to it. (We're creating a directory for your JavaScript bots in general, even though we're only creating one bot in this tutorial.)
4343
4444
```bash
45-
md myJsBots
45+
mkdir myJsBots
4646
cd myJsBots
4747
```
4848

articles/v4sdk/bot-builder-howto-qna.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: kamrani
88
ms.topic: article
99
ms.service: bot-service
1010
ms.subservice: cognitive-services
11-
ms.date: 11/19/2018
11+
ms.date: 01/15/2019
1212
monikerRange: 'azure-bot-service-4.0'
1313
---
1414

@@ -35,7 +35,7 @@ In this topic we will create a knowledge base and use it in a bot.
3535
1. With your knowledge base open, select the **Settings**. Record the value shown for _service name_ as <your_kb_name>
3636
1. Scroll down to find **Deployment details** and record the following values:
3737
- POST /knowledgebases/<your_knowledge_base_id>/generateAnswer
38-
- Host: https://<you_hostname>.azurewebsites.net/qnamaker
38+
- Host: <your_hostname>/qnamaker
3939
- Authorization: EndpointKey <your_endpoint_key>
4040

4141
## Update the .bot file

articles/v4sdk/bot-builder-tutorial-dispatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: kamrani
88
ms.topic: article
99
ms.service: bot-service
1010
ms.subservice: sdk
11-
ms.date: 11/26/2018
11+
ms.date: 01/15/2019
1212
monikerRange: 'azure-bot-service-4.0'
1313
---
1414

0 commit comments

Comments
 (0)