VolatileMemoryStore.TryGetCollection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to get the collection with the specified name.
protected bool TryGetCollection (string name, out System.Collections.Concurrent.ConcurrentDictionary<string,Microsoft.SemanticKernel.Memory.MemoryRecord>? collection, bool create = false);
member this.TryGetCollection : string * ConcurrentDictionary * bool -> bool
Protected Function TryGetCollection (name As String, ByRef collection As ConcurrentDictionary(Of String, MemoryRecord), Optional create As Boolean = false) As Boolean
Parameters
- name
- String
The name of the collection to get.
- collection
- ConcurrentDictionary<String,MemoryRecord>
The retrieved collection, if found.
- create
- Boolean
Whether to create the collection if it does not exist.
Returns
True if the collection was found or created, false otherwise.