diff --git a/doc/source/configuration/quickstart.rst b/doc/source/configuration/quickstart.rst index 71350e1..dd0955a 100644 --- a/doc/source/configuration/quickstart.rst +++ b/doc/source/configuration/quickstart.rst @@ -9,8 +9,7 @@ changed. Either way, here it is, your first state machine configured using Autom .. sourcecode:: csharp :linenos: - class Relationship : - StateMachineInstance + class Relationship { public State CurrentState { get; set; } public string Name { get; set; } @@ -34,7 +33,7 @@ changed. Either way, here it is, your first state machine configured using Autom When(PissOff) .TransitionTo(Enemy), When(Introduce) - .Then((instance,data) => instance.Name = data.Name) + .Then(ctx => ctx.Instance.Name = ctx.Data.Name) .TransitionTo(Friend) ); } @@ -73,9 +72,7 @@ a single state machine. Tracking State -------------- -State is managed in Automatonymous using a class, shown above as the ``Relationship``. Instances -must implement the ``StateMachineInstance`` interface so that the current state can be stored along -with any other properties used by your application. +State is managed in Automatonymous using a class, shown above as the ``Relationship``. Defining Behavior @@ -162,4 +159,4 @@ The instance can also be lifted, making it possible to raise an event without an instanceLift.Raise(helloEvent); Lifts are commonly used by plumbing code to avoid dynamic methods or delegates, making code -clean and fast. \ No newline at end of file +clean and fast.