1using System.Collections;
8public class BaseDocument : IReadOnlyDictionary<string, object?>
10 private readonly Dictionary<string, object?> _data;
15 public DateTime
Ts {
get; }
31 _data =
new Dictionary<string, object?>();
44 _data =
new Dictionary<string, object?>(data);
51 return _data.GetEnumerator();
56 IEnumerator IEnumerable.GetEnumerator()
65 public int Count => _data.Count;
76 return _data.ContainsKey(key);
88 return _data.TryGetValue(key, out value);
96 public object?
this[
string key] => _data[key];
100 public IEnumerable<string>
Keys => _data.Keys;
104 public IEnumerable<object?>
Values => _data.Values;
Represents the base structure of a document.
bool TryGetValue(string key, out object? value)
Gets the value associated with the specified key.
Module Collection
Gets the collection to which the document belongs.
BaseDocument(Module coll, DateTime ts, Dictionary< string, object?> data)
Initializes a new instance of the BaseDocument class with specified collection, timestamp,...
BaseDocument(Module coll, DateTime ts)
Initializes a new instance of the BaseDocument class with specified collection and timestamp.
DateTime Ts
Gets the timestamp of the document.
IEnumerator< KeyValuePair< string, object?> > GetEnumerator()
Returns an enumerator that iterates through the data of the document.
IEnumerable< string > Keys
Gets a collection containing the keys of the data in the document.
IEnumerable< object?> Values
Gets a collection containing the values, excluding properties, of the Document.
int Count
Gets the count of key-value pairs contained in the document.
bool ContainsKey(string key)
Determines whether the Document contains the specified key.
Represents a module, a singleton object grouping related functionalities. Modules are serialized as @...