🔥 Patch C# objects at runtime
A library intended to help with patch operations on DTO objects.
var _patcharp = new Patcharp();
var json = $"{{\"ValueInt\":\"{value}\"}}";
var entity = new Entity();
// Apply patch operation of ValueInt field to Entity.
_patcharp.ApplyPatchOperation(entity, json);
There is an intent to cover all possible situations with value types, reference types, nested and complex objects. Unit tests perform via NUnit framework.
This library will be available in NuGet feed once it's completely tested and ready to be consumed.
There are a lot of work to be done on performance improvements, unit testing, finding bugs. Feel free to create a new issue or help with optimization.
Please send pull requests to add improvements you've come up with.