Skip to content

[Question] Support to build new objects from existing ones #50

@chrisbewz

Description

@chrisbewz

Hello @m31coding ,

Is it possible to implement a way of start the building process from an existing object instance?

Currently the only way of bootstrapping the builder was through usage of InitialStep method, which sets the internal object being buiild as a fresh instance.

But in some scenarios it would be good to be capable of starting from an existing state and just update some particular members (similar to how we rely on with keyword in records. Maybe a new addition on generated code such as Builder.FromExisting(T instance) or an overload of InitialStep like Builder.InitialStep(T instance) would be good ?

Thanks,

Christian

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