Install-Package Blackfeather
git clone https://github.com/TimothyMeadows/Blackfeather
Ths is a helper class for storing data in memory in a managed collection. It supports serialization allowing you to import, and, export serializable types.
Model that data in memory is read, and, written too.
public struct ManagedMemorySpace
{
public long Created;
public long Accessed;
public long Updated;
public string Pointer;
public string Name;
public object Value;
}
Read entry from memory that matches the pointer, and, name.
var memory = new ManagedMemory();
var caw = memory.Read<string>("birds", "raven");
Console.WriteLine(caw);
Read all entries from memory that matches the pointer.
var memory = new ManagedMemory();
var caw = memory.ReadAll<string>("birds");
Console.WriteLine(caw);
Write entry into memory. Remove any previous entry that matches the pointer, and, name.
var memory = new ManagedMemory();
memory.Write("birds", "raven", "caw!");
Write all entres into memory. Remove any previous entries that matches the pointer, and, name.
var memory = new ManagedMemory();
var spaces = new List<ManagedMemorySpace>();
spaces.Add(new ManagedMemorySpace()
{
Created = 0,
Updated = 0,
Accessed = 0,
Pointer = "birds",
Name = "raven",
Value = "caw!"
});
memory.WriteAll(spaces);