Skip to content

Only clone Fields, instead of trying to be smart about cloning properties and collections. #28

@MarcinJuraszek

Description

@MarcinJuraszek

Inspired by https://github.com/ReubenBond/DeepCopy/ from Reuben I think about making a somehow breaking change (v2.0 I think) and move from trying to clone Properties, Fields and Collection Items separately to always cloning fields instead. That would allow us to remove the custom initialization dictionary, CloningFlags and more.

Fields are the only way to store data, and at the end of the day it's just about the data (fields) and not how it's exposed (properties, methods, indexers, etc.).

And as @deipax has already proven, it's possible to read/write from/to private fields using Expression Trees, as long as the right overload it used. So there shouldn't be any issues with doing that.

@deipax - I'd love to get your opinion on that before I start working on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions