You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is modifying internal behaviour of an element without writing a completely new one.
Let's take as an example SelectionPrompt. I wanted to add additional input handling to handle numbers from input as a selection index. Right now, there is no way to do that, as the class itself is sealed, and all inner classes are internal, so I cannot even create a simple copy of the class but need to copypaste the whole hierarchy of internal dependencies or create my own from ground up or not use nuget package and have copy of lib code.
Other places also might benefit from extendibility, for example customization of rendering.
Possible solution is to avoid sealed internal classes and non-virtual methods without possibility to override their behaviour.
Alternatively leave classes sealed but all internals could be made public to create custom classes.
And the third, the safest, option is to add hooks to the main functionality of elements. Like it is done with SelectionPrompt.Converter.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered:
The problem is modifying internal behaviour of an element without writing a completely new one.
Let's take as an example SelectionPrompt. I wanted to add additional input handling to handle numbers from input as a selection index. Right now, there is no way to do that, as the class itself is sealed, and all inner classes are internal, so I cannot even create a simple copy of the class but need to copypaste the whole hierarchy of internal dependencies or create my own from ground up or not use nuget package and have copy of lib code.
Other places also might benefit from extendibility, for example customization of rendering.
Possible solution is to avoid sealed internal classes and non-virtual methods without possibility to override their behaviour.
Alternatively leave classes sealed but all internals could be made public to create custom classes.
And the third, the safest, option is to add hooks to the main functionality of elements. Like it is done with SelectionPrompt.Converter.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: