Shows how to use xtd::environment::cancel_signal event.
#include <xtd/console>
#include <xtd/environment>
#include <xtd/startup>
namespace environment_cancel_sgnal_example {
class program static_ {
public:
static auto main() {
};
while (true) {
else switch (key_info.key_char()) {
case 'e': exit(); break;
default: break;
}
}
}
}
private:
static void exit() {
}
}
}
inline static bool cancel =
true;
};
}
startup_(environment_cancel_sgnal_example::program::main);