Skip to content

A library for Collections with Versions, allowing for operations to get the state of a Collection during a previous Version.

Notifications You must be signed in to change notification settings

HarryCordewener/VersionedCollections

Repository files navigation

VersionedCollections

A library for Collections with Versions, keeping track of the full Collection History, allowing for operations to get the state of a Collection during a previous Version.

Usage

VersionedDictionary

Create your dictionary

var dictionary = new VersionedDictionary<string, string>();

Add and Remove items

dictionary.Add("key", "value");
dictionary.Remove("key");
dictionary.Add("key", "value2");

Get the state of the dictionary at the latest, or a previous version

dictionary["key"]; // "value2"
dictionary[1, "key"]; // "value"

Get the state of the dictionary at a specific version, flattened.

dictionary.GetDictionary(1); // { "key", "value" }
dictionary.GetDictionary(2); // { }
dictionary.GetDictionary(3); // { "key", "value2" }
dictionary.GetDictionary();  // { "key", "value2" }

About

A library for Collections with Versions, allowing for operations to get the state of a Collection during a previous Version.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages