gui-cs / Terminal.Gui

Cross Platform Terminal UI toolkit for .NET
MIT License
9.73k stars 695 forks source link

Add IConsoleDriver #3846

Open tznind opened 1 day ago

tznind commented 1 day ago

Is your feature request related to a problem? Please describe. A very useful step towards #3837 would be if everyone who referenced Driver especially Application.Driver hit an interface instead of a concrete class.

This would enable me to write a facade that makes the new system look like the old driver.

Describe the solution you'd like Add IConsoleDriver interface and replace all properties/fields/static references to ConsoleDriver to IConsoleDriver

Describe alternatives you've considered I could make the changes in my own branch but I think that would be a mistake.

This is useful work in general so would fit in to v2_develop directly and doesnt need to be tied to #3837

tznind commented 1 day ago

Looks like ReSharper might do this as a one click 'ReSharper > Refactor > Extract Interface'

I will have a try tomorrow