Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IPersistentDictionary.cs
1using System;
2using System.Collections.Generic;
3using System.Threading.Tasks;
4
5namespace Waher.Persistence
6{
10 public interface IPersistentDictionary : IDisposable, IDictionary<string, object>
11 {
16
20 Task ClearAsync();
21
27 Task<bool> ContainsKeyAsync(string key);
28
36 Task AddAsync(string key, object value);
37
46 Task AddAsync(string key, object value, bool ReplaceIfExists);
47
54 Task<bool> RemoveAsync(string key);
55
67 Task<KeyValuePair<bool, object>> TryGetValueAsync(string key);
68
75 Task<KeyValuePair<string, object>[]> GetEntriesAsync(string FromKey, string ToKey);
76
82 Task CopyKeysToAsync(string[] Keys, int Offset);
83
89 Task CopyValuesToAsync(object[] Values, int Offset);
90
95 Task<string[]> GetKeysAsync();
96
101 Task<object[]> GetValuesAsync();
102
103 }
104}
Persistent dictionary that can contain more entries than possible in the internal memory.
Task< string[]> GetKeysAsync()
Gets all keys.
Task< KeyValuePair< string, object >[]> GetEntriesAsync(string FromKey, string ToKey)
Gets a range of entries from one key to another.
Task CopyKeysToAsync(string[] Keys, int Offset)
Copies available keys to a string array.
void DeleteAndDispose()
Deletes the dictionary and disposes the object.
Task< KeyValuePair< bool, object > > TryGetValueAsync(string key)
Gets the value associated with the specified key.
Task< bool > ContainsKeyAsync(string key)
Determines whether the System.Collections.Generic.IDictionary{string,object} contains an element with...
Task< bool > RemoveAsync(string key)
Removes the element with the specified key from the System.Collections.IDictionary object.
Task AddAsync(string key, object value, bool ReplaceIfExists)
Adds an element with the provided key and value to the System.Collections.Generic....
Task< object[]> GetValuesAsync()
Gets all values.
Task AddAsync(string key, object value)
Adds an element with the provided key and value to the System.Collections.Generic....
Task ClearAsync()
Clears the dictionary.
Task CopyValuesToAsync(object[] Values, int Offset)
Copies available values to an array.