TrackableData.Core.MessagePack

neuecc/MessagePack-CSharp Resolver for tracker classes of TrackableData for DotNet Core.


Keywords
trackable, data, messagepack
License
MIT
Install
Install-Package TrackableData.Core.MessagePack -Version 2.0.6

Documentation

TrackableData

NuGet Status Build status Coverage Status Coverity Status

TrackableData provides a way to track the changes of poco, list, set and dictionary. It's small and simple to use. For example:

var u = new TrackableUserData();     // create UserData can track changes
u.SetDefaultTracker();               // set Tracker to track changes of UserData

u.Name = "Bob";                      // make changes
u.Level = 1;
u.Gold = 10;

Console.WriteLine(u.Tracker);        // watch what has changed via Tracker
                                     // { Name:->Bob, Level:0->1, Gold:0->10 }

u.Tracker.Clear();                   // clear all changes

u.Level += 10;                       // make another changes
u.Gold += 100;

Console.WriteLine(u.Tracker);        // watch what has changed via Tracker
                                     // { Level:1->11, Gold:10->110 }

Where can I get it?

PM> Install-Package TrackableData

TrackableData uses compile-time code generation to track poco and user container. So if you want use it, install TrackableData.Templates too.

PM> Install-Package TrackableData.Templates

Why do you make another trackable library?

There are many good libraries for tracking data. Most of them are ORM libraries like EntityFramework and NHibernate. They provides several good-to-have features and affordable performance. But just for tracking data it seems a little bit big.

This library has been developed for two goals.

Lean library.

It works only for tracking data and doesn't aim at being versatile ORM. Because of that, it can be kept small and simple and also provides additional features like rollback and merge of changes.

Support Unity3D (.NET Framework 3.5)

Unity3D only supports .NET Framework 3.5 until now. And dynamic code generation is forbidden to support iOS and WebGL which uses IL2CPP. Core library and transfer plugins are written under this limitation.

Manual

Comprehensive manual for using TrackableData: Manual

Plugins

TrackableData itself just tracks changes. For more jobs, plugins are required. There are two categories for plugins.

Transfer Changes

Common serialization library works for transfering changes. But more readable and optimized representation can be achieved with help of plugin.

Save Changes

For data persistency, storage plugin is essential.