⭐ That's it! Feel free to map this method to your extension so if you need to migrate in the future it's a matter of just switching that method. We

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2025-01-10 00:00:08

⭐ That's it! Feel free to map this method to your extension so if you need to migrate in the future it's a matter of just switching that method. We intentionally don't ship our own .DeepClone() extension method.

FastCloner uses caching by default which makes evaluating properties harder. Cloning unmanaged resources, such as IntPtrs may result in side-effects, as there is no metadata for the length of buffers such pointers often point to. ReadOnly collections are tested to behave well as long as they follow basic conventions. Many other features, such as cloning Dictionaryies properly while keeping hashcodes, INotifyPropertyChanged, delegates, events, HttpRequests / responses, and others are supported. If something doesn't work out of the box let me know in the issues, the repository is actively maintained.

FastCloner aims to work correctly and meet reasonable expectations by default while being fast. Benchmarking results are available here, check them out! By default, fast cloner relies on heavily cached reflection to work. An incremental source generator is currently in development as an opt-in alternative for performance-critical scenarios.

Leave a Comment