ImmutableObjectGraph
ImmutableObjectGraph copied to clipboard
Add CopyInto method to the builders
This adds the ability to reset a builder with an immutable object by copying all the fields into the builder. I think it handles recursive builders correctly.
Writing Roslyn syntax trees is an excercise in pain though. I'm not sure that T4 templates are easier to deal with. The expression trees are so verbose to be unintelligable.
I haven't finished reviewing, but it looks promising. I would want to rename CopyInto to CopyFrom to more clearly indicate that the argument is providing the template instead of receiving it. Consider the .NET CopyTo method, which copies from the receiver to the argument.