Closed jonnew closed 2 weeks ago
A nice tip from @glopesdev
If you want to “rename” an operator in a backwards compatible way just rename the type directly and make a “mock” deprecated with the old name inherited from the renamed, i.e.:
class NewName { } [Obsolete] class OldName : NewName { }
For example, remove the
Breakout
prefix herehttps://github.com/open-ephys/onix-bonsai-onix1/blob/f48d2f2f7a3af84d840c6a5d696bf5cb99d5616c/OpenEphys.Onix1/ConfigureBreakoutAnalogIO.cs#L282C18-L282C34
Why? Because it was wrong to add
Breakout
all over the place in the first place, including toConfigureBreakoutAnalogIO
andConfigureBreakoutDigitalIO
. The addition of this breakout grouping information should always have come from inclusion of these configuration types in theBreakoutBoard
MutiDeviceFractory
. This was correct because these devices dont actually even exist on the breakout board and that situation is perectly modeled by theMultiDeviceFactory
which is a logical grouping of components that dont actually need to correspond to anything physical. Further, whenBreakout
is added to the type name, you end up with stupid lookingDeviceNames
likeBreakoutBoard/BreakoutAnalogIO
. Doing the full change will break the public API. In the meantime, at least the inner, static static hardware definition classes withinConfigure<>
classes can be changed dos that the drop down list items don't look so bad.