Closed airbreather closed 4 years ago
:+1 for just IUnique
.
Concerning IEditableUnique
one could also argue that implementations of the interface shall only allow setting the ID once that is when no value has been assigned yet.
only allow setting the ID once that is when no value has been assigned yet
Yeah that kind of thought is why I wanted to limit what we offer to just a read-only property, since some implementations may memberwise-copy an existing instance and replace its ID with a new one, which means that we probably don't want to 100% define any behavior in our own interface contract.
For context:
I don't think we need to go all the way to "
IUniqueFeature
", just "IUnique
" should be enough.Also, not all
IUnique
implementations will want theId
be settable, and we don't need it to be for any concrete plans that I know of right now, so just a getter for now. It's possible to add a setter later without breaking anyone: