Share via


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 等。

建構函式

TurnContextStateCollection()

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

方法

Add<T>(String, T)

將值新增至回合的內容。

Add<T>(T)

將值新增至回合的內容。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

Dispose(Boolean)

如果處置參數設定為 true,則會釋放資源。

Get<T>()

依類型從回合的內容取得預設值。

Get<T>(String)

依名稱從回合的內容取得快取的值。

Set<T>(String, T)

將值設定為回合的內容。

Set<T>(T)

將值設定為回合的內容。

適用於