public static async Task <RobotScheduler> Connect() { var scheduler = new RobotScheduler(); await scheduler.ConnectInernal(); return(scheduler); }
static async Task Main() { await using var robot = await RobotScheduler.Connect(); robot.AddBehavior(ParrotModeScreen); robot.AddBehavior(ParrotModeWheels); robot.AddBehavior(ParrotModeLift); robot.AddBehavior(ParrotModeHead); Console.ReadKey(); }