語言

DialogStateManager 類別

定義

DialogStateManager 管理記憶體範圍與路徑解析器。記憶體範圍為根層物件,可能存在於對話上下文中或非回合狀態。路徑解析器允許快速執行,像是 $foo -> dialog.foo 這類資料的映射。

public class DialogStateManager : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>
type DialogStateManager = class
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public Class DialogStateManager
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object))
繼承
DialogStateManager
實作

建構函式

名稱 Description
DialogStateManager(DialogContext, DialogStateManagerConfiguration)

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

屬性

名稱 Description
Configuration

取得或設定對話框狀態管理員的已設定路徑解析程式和記憶體範圍。

Count

在對話狀態管理器中取得記憶體範圍的數量。

IsReadOnly

取得值,指出對話框狀態管理員是否為唯讀。

Item[String]

取得或設定指定鍵的元素。

Keys

會得到包含 ICollection<T> 記憶體示波器的金鑰。

Values

取得 和 ICollection<T> 包含記憶體範圍的值。

方法

名稱 Description
Add(KeyValuePair<String,Object>)

將專案加入對話框狀態管理員。

Add(String, Object)

將專案加入對話框狀態管理員。

AnyPathChanged(UInt32, IEnumerable<String>)

檢查水位線之後是否有任何路徑變更。

Clear()

從對話框狀態管理員中移除所有專案。

Contains(KeyValuePair<String,Object>)

判斷對話框狀態管理員是否包含特定值。

ContainsKey(String)

判斷對話框狀態管理員是否包含具有指定索引鍵的專案。

CopyTo(KeyValuePair<String,Object>[], Int32)

將對話框狀態管理員的項目複製到從特定索引開始的陣列。

DeleteScopesMemoryAsync(String, CancellationToken)

刪除範圍的記憶體。

GetBoolValue(String, Boolean)

使用路徑表達式從記憶體取得布爾值。

GetEnumerator()

傳回逐一查看集合的列舉值。

GetIntValue(String, Int32)

使用路徑表達式從記憶體取得int值。

GetMemoryScope(String)

依名稱取得 MemoryScope。

GetMemorySnapshot()

取得適合記錄的所有記憶體範圍。

GetStringValue(String, String)

使用路徑表達式從記憶體取得字串值。

GetValue<T>(String, Func<T>)

使用路徑表達式從記憶體取得值(注意:這一律會傳回值的複製項)。

LoadAllScopesAsync(CancellationToken)

載入所有範圍。

Remove(KeyValuePair<String,Object>)

移除對話狀態管理器中特定物件的首次出現。

Remove(String)

從對話框狀態管理員中移除具有指定索引鍵的專案。

RemoveValue(String)

從記憶體中移除屬性。

ResolveMemoryScope(String, String)

ResolveMemoryScope 會尋找 的 MemoryScope,並傳回剩餘的路徑。

SaveAllChangesAsync(CancellationToken)

儲存所有範圍的變更。

SetValue(String, Object)

將記憶體設定為值。

TrackPaths(IEnumerable<String>)

追蹤特定路徑何時變更。

TransformPath(String)

使用已註冊的PathTransformers轉換路徑。

TryGetValue(String, Object)

取得與指定索引鍵相關聯的值。

TryGetValue<T>(String, T)

使用路徑表達式從記憶體取得值(注意:這一律會傳回值的複製項)。

Version()

版本協助呼叫者識別更新並決定快取。

明確介面實作

名稱 Description
IEnumerable.GetEnumerator()

DialogStateManager 管理記憶體範圍與路徑解析器。記憶體範圍為根層物件,可能存在於對話上下文中或非回合狀態。路徑解析器允許快速執行,像是 $foo -> dialog.foo 這類資料的映射。

適用於