語言

TurnContextStateCollection 類別

定義

值在該回合的整個壽命中都持續存在,作為 ITurnContext.

public class TurnContextStateCollection : System.Collections.Generic.Dictionary<string,object>, IDisposable
type TurnContextStateCollection = class
    inherit Dictionary<string, obj>
    interface IDisposable
Public Class TurnContextStateCollection
Inherits Dictionary(Of String, Object)
Implements IDisposable
繼承
TurnContextStateCollection
實作

備註

這裡典型儲存的值是需要在回合壽命內的物件,例如 IStorage、BotState、ConversationState、ILanguageGenerator、ResourceExplorer 等。

建構函式

名稱 Description
TurnContextStateCollection()

初始化 TurnContextStateCollection 類別的新執行個體。

方法

名稱 Description
Add<T>(String, T)

將值新增至回合的內容。

Add<T>(T)

將值新增至回合的內容。

Dispose()

執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。

Dispose(Boolean)

若處置參數設為 true,則釋放資源。

Get<T>()

從回合上下文中取得預設值。

Get<T>(String)

從回合上下文中以名稱取得快取值。

Set<T>(String, T)

設定一個回合上下文值。

Set<T>(T)

設定一個回合上下文值。

適用於