Skip to main content

State

  • Chapter
  • First Online:
Design Patterns in .NET
  • 1635 Accesses

Abstract

I must confess, my behavior is governed by my state. If I didn’t get enough sleep, I am going to be a bit tired. If I had a drink, I wouldn’t get behind the wheel. All of these are states and they govern my behavior: how I feel, what I can and cannot do.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    I lied, twice. First, I don’t drive a car; I prefer electric bikes. Not that it affects drinking in any way—it is still not allowed. Second, I don’t drink coffee.

  2. 2.

    Stateless can be found at https://github.com/dotnet-state-machine/stateless . It’s worth noting that the phone call example actually comes from the authors of SimpleStateMachine, a project on which Stateless is based.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Dmitri Nesteruk

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Nesteruk, D. (2019). State. In: Design Patterns in .NET. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4366-4_22

Download citation

Publish with us

Policies and ethics