Key

This line was added.

This line was removed.

Formatting was changed.

...

This example isn't an exact equivalent of the others. It doesn't use predefined Online and Offline classes. Instead it defines the entire state machine on the fly as needed. See the previous reference for more elaborate examples of this style.