Microsoft.Bot.Connector.StateClient Class Reference

The Bot State REST API allows your bot to store and retrieve state associated with conversations conducted through the Bot Connector REST API. The Bot State REST API uses REST and HTTPS to send and receive encoded content that your bot controls. More...

Inheritance diagram for Microsoft.Bot.Connector.StateClient:

Public Member Functions

 StateClient (Uri baseUri, string microsoftAppId=null, string microsoftAppPassword=null, params DelegatingHandler[] handlers)
 Create a new instance of the StateClient class More...
 
 StateClient (Uri baseUri, MicrosoftAppCredentials credentials, bool addJwtTokenRefresher=true, params DelegatingHandler[] handlers)
 Create a new instance of the StateClient class More...
 
 StateClient (MicrosoftAppCredentials credentials, bool addJwtTokenRefresher=true, params DelegatingHandler[] handlers)
 Create a new instance of the StateClient class More...
 

Protected Member Functions

 StateClient (params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (Uri baseUri, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (ServiceClientCredentials credentials, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 
 StateClient (Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
 Initializes a new instance of the StateClient class. More...
 

Properties

Uri BaseUri [get, set]
 The base URI of the service. More...
 
virtual IBotState BotState [get]
 Gets the IBotState. More...
 
ServiceClientCredentials Credentials [get]
 Subscription credentials which uniquely identify client subscription. More...
 
JsonSerializerSettings DeserializationSettings [get]
 Gets or sets json deserialization settings. More...
 
JsonSerializerSettings SerializationSettings [get]
 Gets or sets json serialization settings. More...
 

Detailed Description

The Bot State REST API allows your bot to store and retrieve state associated with conversations conducted through the Bot Connector REST API. The Bot State REST API uses REST and HTTPS to send and receive encoded content that your bot controls.

Client libraries for this REST API are available. See below for a list.

Your bot may store data for a user, a conversation, or a single user within a conversation (called "private" data). Each payload may be up to 32 kilobytes in size. The data may be removed by the bot or upon a user's request, e.g. if the user requests the channel to inform the bot (and therefore, the Bot Framework) to delete the user's data.

The Bot State REST API is only useful in conjunction with the Bot Connector REST API.

Authentication for both the Bot State and Bot Connector REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the Connector Authentication document.

Client Libraries for the Bot State REST API

© 2016 Microsoft

Definition at line 57 of file StateClient.cs.

Constructor & Destructor Documentation

Microsoft.Bot.Connector.StateClient.StateClient ( params DelegatingHandler[]  handlers)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 90 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( HttpClientHandler  rootHandler,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
rootHandlerOptional. The http client handler used to handle http transport.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 104 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( Uri  baseUri,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
baseUriOptional. The base URI of the service.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 118 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( Uri  baseUri,
HttpClientHandler  rootHandler,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
baseUriOptional. The base URI of the service.
rootHandlerOptional. The http client handler used to handle http transport.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 139 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( ServiceClientCredentials  credentials,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
credentialsRequired. Subscription credentials which uniquely identify client subscription.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 157 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( ServiceClientCredentials  credentials,
HttpClientHandler  rootHandler,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
credentialsRequired. Subscription credentials which uniquely identify client subscription.
rootHandlerOptional. The http client handler used to handle http transport.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 182 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( Uri  baseUri,
ServiceClientCredentials  credentials,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
baseUriOptional. The base URI of the service.
credentialsRequired. Subscription credentials which uniquely identify client subscription.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 207 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( Uri  baseUri,
ServiceClientCredentials  credentials,
HttpClientHandler  rootHandler,
params DelegatingHandler[]  handlers 
)
inlineprotected

Initializes a new instance of the StateClient class.

Parameters
baseUriOptional. The base URI of the service.
credentialsRequired. Subscription credentials which uniquely identify client subscription.
rootHandlerOptional. The http client handler used to handle http transport.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 240 of file StateClient.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( Uri  baseUri,
string  microsoftAppId = null,
string  microsoftAppPassword = null,
params DelegatingHandler[]  handlers 
)
inline

Create a new instance of the StateClient class

Parameters
baseUriBase URI for the State service
microsoftAppIdOptional. Your Microsoft app id. If null, this setting is read from settings["MicrosoftAppId"]
microsoftAppPasswordOptional. Your Microsoft app password. If null, this setting is read from settings["MicrosoftAppPassword"]
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 22 of file StateClientEx.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( Uri  baseUri,
MicrosoftAppCredentials  credentials,
bool  addJwtTokenRefresher = true,
params DelegatingHandler[]  handlers 
)
inline

Create a new instance of the StateClient class

Parameters
baseUriBase URI for the State service
credentialsCredentials for the Connector service
addJwtTokenRefresherTrue, if JwtTokenRefresher should be included; False otherwise.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 34 of file StateClientEx.cs.

Microsoft.Bot.Connector.StateClient.StateClient ( MicrosoftAppCredentials  credentials,
bool  addJwtTokenRefresher = true,
params DelegatingHandler[]  handlers 
)
inline

Create a new instance of the StateClient class

This constructor will use https://state.botframework.com as the baseUri

Parameters
credentialsCredentials for the Connector service
addJwtTokenRefresherTrue, if JwtTokenRefresher should be included; False otherwise.
handlersOptional. The delegating handlers to add to the http client pipeline.

Definition at line 81 of file StateClientEx.cs.

Property Documentation

Uri Microsoft.Bot.Connector.StateClient.BaseUri
getset

The base URI of the service.

Definition at line 62 of file StateClient.cs.

virtual IBotState Microsoft.Bot.Connector.StateClient.BotState
get

Gets the IBotState.

Definition at line 82 of file StateClient.cs.

ServiceClientCredentials Microsoft.Bot.Connector.StateClient.Credentials
get

Subscription credentials which uniquely identify client subscription.

Definition at line 77 of file StateClient.cs.

JsonSerializerSettings Microsoft.Bot.Connector.StateClient.DeserializationSettings
get

Gets or sets json deserialization settings.

Definition at line 72 of file StateClient.cs.

JsonSerializerSettings Microsoft.Bot.Connector.StateClient.SerializationSettings
get

Gets or sets json serialization settings.

Definition at line 67 of file StateClient.cs.


The documentation for this class was generated from the following files: