共用方式為


MemoryStorage 建構函式

定義

多載

MemoryStorage(Dictionary<String,JObject>)

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

MemoryStorage(JsonSerializer, Dictionary<String,JObject>)

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

MemoryStorage(Dictionary<String,JObject>)

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

public MemoryStorage(System.Collections.Generic.Dictionary<string,Newtonsoft.Json.Linq.JObject> dictionary = default);
new Microsoft.Bot.Builder.MemoryStorage : System.Collections.Generic.Dictionary<string, Newtonsoft.Json.Linq.JObject> -> Microsoft.Bot.Builder.MemoryStorage
Public Sub New (Optional dictionary As Dictionary(Of String, JObject) = Nothing)

參數

dictionary
Dictionary<String,Newtonsoft.Json.Linq.JObject>

要使用的預先存在的字典;或 null 表示使用新的 。

適用於

MemoryStorage(JsonSerializer, Dictionary<String,JObject>)

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

public MemoryStorage(Newtonsoft.Json.JsonSerializer jsonSerializer, System.Collections.Generic.Dictionary<string,Newtonsoft.Json.Linq.JObject> dictionary = default);
new Microsoft.Bot.Builder.MemoryStorage : Newtonsoft.Json.JsonSerializer * System.Collections.Generic.Dictionary<string, Newtonsoft.Json.Linq.JObject> -> Microsoft.Bot.Builder.MemoryStorage
Public Sub New (jsonSerializer As JsonSerializer, Optional dictionary As Dictionary(Of String, JObject) = Nothing)

參數

jsonSerializer
Newtonsoft.Json.JsonSerializer

如果傳入自訂 JsonSerializer,建議您進行下列設定:

jsonSerializer.TypeNameHandling = TypeNameHandling.All。

jsonSerializer.NullValueHandling = NullValueHandling.Include。

jsonSerializer.ContractResolver = new DefaultContractResolver () 。

dictionary
Dictionary<String,Newtonsoft.Json.Linq.JObject>

要使用的預先存在的字典;或 null 表示使用新的 。

適用於