andrewlock / StronglyTypedId

A Rosyln-powered generator for strongly-typed IDs
MIT License
1.52k stars 80 forks source link

Add option for controlling constructor generation #79

Closed NxSoftware closed 3 months ago

NxSoftware commented 2 years ago

Implements #75

I had thought about adding additional options to the StronglyTypedIdImplementations enum. Since that enum is defined as [Flags] then it would make for a confusing API as it would be possible to specify multiple constructor visibility levels (e.g. StronglyTypedImplementations.PrivateConstructor | StronglyTypedImplementations.PublicConstructor, hence why this option is a separate enum.

NxSoftware commented 1 year ago

@andrewlock any chance you can have a look at this soon? I think it'll be a really useful addition

NxSoftware commented 1 year ago

Resolved the prior conflicts, and thanks to the work in #95 the diff is significantly smaller now.

NxSoftware commented 3 months ago

Closing due to the underlying implementation changing to use templates where the constructor can be controlled.