Method Initialize
Initialize(IDriver?)
Called after the driver is fully initialized to allow the size monitor to perform any setup that requires access to the driver (e.g., queuing ANSI requests, setting up signal handlers, registering for console events).
void Initialize(IDriver? driver)
Parameters
driverIDriverThe fully initialized driver instance
Remarks
This method is called by the framework after all driver components are created and wired up. Implementations can use this to:
- Queue ANSI size queries (ANSI drivers)
- Set up platform-specific signal handlers (UnixDriver with SIGWINCH)
- Register for console buffer events (WindowsDriver)
- Query initial size asynchronously
The default implementation does nothing, making this method optional for size monitors that don't need post-initialization setup (like those that can query size synchronously via Console.WindowWidth/Height).