Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update quickstart.rst #25

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions doc/source/configuration/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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)
);
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
clean and fast.