Copyable available on GitHub
People actually download and use Copyable, and they tend to use it in scenarios I haven’t used it in. This results in bug reports and patch submissions. So far, these have been given to me by e-mail or by blog comment, neither of which is a particularly great way of receiving them. So after receiving another one today, I finally got around to putting Copyable on GitHub.
The version I put up includes several enhancements from the latest release:
- It uses
FormatterServices.GetUninitializedObjectand hence does not depend on a parameterless constructor or custom instance provider (but you can of course still create an instance provider if you want to control object initialization) - The bug with copy semantics for already visited objects submitted by Walter Oesch has been fixed
- The bug with inherited fields found by Alex, and the patch submitted for it, has been incorporated
Bleeding edge Copyable can be found at http://github.com/havard/copyable. The clone URL is git://github.com/havard/copyable.git. Now go fix your own bugs! Or even better, enhance the framework.
























Daniel Bachler said
on January 18 2010 at 17:31
I wrote a small extension to the copyable framework (nice work btw!). It let’s you mark fields with a custom attribute to exclude them from the deep copy (useful for caches, parent references etc). Where should I send the patch so you can consider adding it to upstream?
Håvard said
on January 18 2010 at 20:09
Daniel: Glad to hear you find it useful!
You can fork Copyable on Github, commit your changes, and give me a repository address to pull from.
Or, if you prefer, you can send me the patch by e-mail. I’ve sent you an e-mail to the address you provided.