diff --git a/Directory.Build.props b/Directory.Build.props index 0805d27..118b552 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ latest True - 2.3.1 + 2.4.0 ../../output/$(MSBuildProjectName) true diff --git a/docs/icon-128x128.png b/docs/icon-128x128.png index 64db45f..165574b 100644 Binary files a/docs/icon-128x128.png and b/docs/icon-128x128.png differ diff --git a/docs/Sample-ExportUml-Level1-Legend.svg b/docs/images/Sample-ExportUml-Level1-Legend.svg similarity index 100% rename from docs/Sample-ExportUml-Level1-Legend.svg rename to docs/images/Sample-ExportUml-Level1-Legend.svg diff --git a/docs/Sample-ExportUml-Level3.svg b/docs/images/Sample-ExportUml-Level3.svg similarity index 100% rename from docs/Sample-ExportUml-Level3.svg rename to docs/images/Sample-ExportUml-Level3.svg diff --git a/docs/icon-128x128.pdn b/docs/images/icon-128x128.pdn similarity index 100% rename from docs/icon-128x128.pdn rename to docs/images/icon-128x128.pdn diff --git a/docs/images/icon-128x128_MK2.png b/docs/images/icon-128x128_MK2.png new file mode 100644 index 0000000..64db45f Binary files /dev/null and b/docs/images/icon-128x128_MK2.png differ diff --git a/docs/icon-poc-1.jpg b/docs/images/icon-poc-1.jpg similarity index 100% rename from docs/icon-poc-1.jpg rename to docs/images/icon-poc-1.jpg diff --git a/docs/icon-poc-2.jpg b/docs/images/icon-poc-2.jpg similarity index 100% rename from docs/icon-poc-2.jpg rename to docs/images/icon-poc-2.jpg diff --git a/docs/icon-poc-3.png b/docs/images/icon-poc-3.png similarity index 100% rename from docs/icon-poc-3.png rename to docs/images/icon-poc-3.png diff --git a/docs/icon.pdn b/docs/images/icon.pdn similarity index 100% rename from docs/icon.pdn rename to docs/images/icon.pdn diff --git a/docs/images/nuget-state-machine-icon-badge.png b/docs/images/nuget-state-machine-icon-badge.png new file mode 100644 index 0000000..697a622 Binary files /dev/null and b/docs/images/nuget-state-machine-icon-badge.png differ diff --git a/docs/images/nuget-state-machine-icon-chip.png b/docs/images/nuget-state-machine-icon-chip.png new file mode 100644 index 0000000..165574b Binary files /dev/null and b/docs/images/nuget-state-machine-icon-chip.png differ diff --git a/docs/images/nuget-state-machine-icon-isometric.png b/docs/images/nuget-state-machine-icon-isometric.png new file mode 100644 index 0000000..e412ab5 Binary files /dev/null and b/docs/images/nuget-state-machine-icon-isometric.png differ diff --git a/docs/images/nuget-state-machine-icon-minimal.png b/docs/images/nuget-state-machine-icon-minimal.png new file mode 100644 index 0000000..9c7bed0 Binary files /dev/null and b/docs/images/nuget-state-machine-icon-minimal.png differ diff --git a/docs/images/nuget-state-machine-icon.png b/docs/images/nuget-state-machine-icon.png new file mode 100644 index 0000000..0c040a7 Binary files /dev/null and b/docs/images/nuget-state-machine-icon.png differ diff --git a/readme.md b/readme.md index 5aaa6b4..804b2a3 100644 --- a/readme.md +++ b/readme.md @@ -28,6 +28,9 @@ You can define the state machine using either the fluent design pattern or stand ### Basic State +![](docs/images/nuget-state-machine-icon-isometric.png) +The basic state exapmle transitions from `State1 -> State2 -> State3`. + ```cs // That's it! Just create the state machine, register states, and run it. var machine = await new StateMachine() @@ -57,7 +60,7 @@ public class BasicState1() : BaseState { public async Task OnEnter(Context context) { - await Task.Yield(); // Some async work here... + await Task.Yield(); // Your async work here... context.NextState(Result.Ok); } } @@ -66,8 +69,9 @@ public class BasicState2() : BaseState { public Task OnEnter(Context context) { + // Notice, we did not async/await this method context.NextState(Result.Ok); - return Task.CompletedTask; // Notice, we did not async/await this method + return Task.CompletedTask; } } @@ -91,6 +95,8 @@ var uml = machine.ExportUml(includeSubmachines: true); ### Composite States +The following uses the fluent design pattern style, stacking the `.RegisterXXX(...)` methonds ontop of each other with the `RunAsync(...)` method occurring at the end. + ```cs using Lite.StateMachine;