MemoryCache.GetValues(IEnumerable<String>, String) 方法

定義

傳回一組對應至指定索引鍵的快取專案。

public override System.Collections.Generic.IDictionary<string,object> GetValues(System.Collections.Generic.IEnumerable<string> keys, string regionName = default);
override this.GetValues : seq<string> * string -> System.Collections.Generic.IDictionary<string, obj>
Public Overrides Function GetValues (keys As IEnumerable(Of String), Optional regionName As String = Nothing) As IDictionary(Of String, Object)

參數

keys
IEnumerable<String>

一組用於快取條目要回傳的唯一識別碼。

regionName
String

快取中被新增快取條目的命名區域。 不要傳遞該參數的值。 這個參數是 null 預設的,因為該 MemoryCache 類別不實作區域。

傳回

一組對應指定鍵的快取項目。

例外狀況

regionName 不是 null

keysnull

集合中的一個單獨鍵為 null

備註

若不存在由 表示 keys 的快取條目,則字典中回傳物件的對應值設為 null。 因此,回傳的字典項目數量總是與 中的 keys元素數相同。

適用於