AdapterExtensions.UseStorage(BotAdapter, IStorage) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds middleware to the adapter to register an IStorage object on the turn context. The middleware registers the state objects on the turn context at the start of each turn.
public static Microsoft.Bot.Builder.BotAdapter UseStorage (this Microsoft.Bot.Builder.BotAdapter botAdapter, Microsoft.Bot.Builder.IStorage storage);
static member UseStorage : Microsoft.Bot.Builder.BotAdapter * Microsoft.Bot.Builder.IStorage -> Microsoft.Bot.Builder.BotAdapter
<Extension()>
Public Function UseStorage (botAdapter As BotAdapter, storage As IStorage) As BotAdapter
Parameters
- botAdapter
- BotAdapter
The adapter on which to register the storage object.
- storage
- IStorage
The storage object to register.
Returns
The updated adapter.
Remarks
To get the storage object, use the turn context's TurnState property's Get<T>() method.