spectre.console icon indicating copy to clipboard operation
spectre.console copied to clipboard

Change IListPromptStrategy interface access modifier to public

Open danielklecha opened this issue 3 years ago • 1 comments

Hi,

I want to add to MultiSelectionPrompt choices which should be checked and prompt should be submited immediatelly. Example: I display 30 choices but database contains 1000 choices so at the end I added choice to force program to load next prompt.

I want to wrap MultiSelectionPrompt and extend logic implemented in IListPromptStrategy. Unfortunatelly this interfase is internal. Could you set it to public?

Anyway, Library is great!

danielklecha avatar Jan 30 '22 12:01 danielklecha

@danielklecha Opening up IListPromptStrategy won't do you any good since ListPrompt<T> and other things needed aren't public. The reason for this is that we haven't built the functionality to be open for external customization.

We would need to have a conversation within the team to see if there is a way of making this public without adding a lot of support burden. In the meanwhile, you could always copy the code from https://github.com/spectreconsole/spectre.console/tree/main/src/Spectre.Console/Prompts/List and create a new prompt.

patriksvensson avatar Jan 30 '22 13:01 patriksvensson