3/24/2023 0 Comments Iconsole motionscykel![]() ![]() ![]() Interface for a class that needs to be able to scroll portions of the screen. void PrintAtColor(ConsoleColor foreground, int x, int y, string text, ConsoleColor? background).void PrintAt(int x, int y, string text).void PrintAt(int x, int y, string format, params object args).Interface for a class that needs to print at a specific location in a window. void Clear(ConsoleColor? backgroundColor).void WriteLine(ConsoleColor color, string text).void WriteLine(ConsoleColor color, string format, params object args).void Write(ConsoleColor color, string text).void Write(ConsoleColor color, string format, params object args). ![]() Public interface IWriteColor : ISetColors printing only (no color) and printing at? Then use interface inheritance and implement just the bits you need. Logging, printing only? IWrite, Needs to print in color? IWriteColor, Need to change the cursor position when printing? IPrintAt, eed to scroll portions of the screen? IScrolling, Need all of the above? IConsole. Pick the narrowest set of features that the class that you are refactoring depends on. As soon as that's done I'll release the first version 1.0.0-alpha do some testing, and then remove the alpha status. I have not yet migrated Goblinfactory.Konsole over to using the new contracts yet. The ink on this project is still only a few days wet. pre-beta and inviting discussion before it get's released as official version 1.0), meaning that the final interface contracts are still being finalised and may change with the final version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |