Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simplestatemachine/simplestatemachinelibrary
📚 A simple library for realization state machines in C# code
https://github.com/simplestatemachine/simplestatemachinelibrary
csharp finite-state-machine library netstandard simple-state-machine simplestatemachine state state-machine statemachine
Last synced: 3 months ago
JSON representation
📚 A simple library for realization state machines in C# code
- Host: GitHub
- URL: https://github.com/simplestatemachine/simplestatemachinelibrary
- Owner: SimpleStateMachine
- License: mit
- Created: 2020-02-18T21:22:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-07T15:00:34.000Z (over 3 years ago)
- Last Synced: 2024-09-01T09:02:48.878Z (5 months ago)
- Topics: csharp, finite-state-machine, library, netstandard, simple-state-machine, simplestatemachine, state, state-machine, statemachine
- Language: C#
- Homepage:
- Size: 184 KB
- Stars: 49
- Watchers: 7
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![NuGet Pre Release](https://img.shields.io/nuget/vpre/SimpleStateMachineLibrary.svg)](https://www.nuget.org/packages/SimpleStateMachineLibrary) [![](https://img.shields.io/github/stars/SimpleStateMachine/SimpleStateMachineLibrary)](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary) [![NuGet Downloads](https://img.shields.io/nuget/dt/SimpleStateMachineLibrary)](https://www.nuget.org/packages/SimpleStateMachineLibrary) [![](https://img.shields.io/github/license/SimpleStateMachine/SimpleStateMachineLibrary)](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary) [![](https://img.shields.io/github/languages/code-size/SimpleStateMachine/SimpleStateMachineLibrary)](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary)
[![]( https://img.shields.io/github/last-commit/SimpleStateMachine/SimpleStateMachineLibrary)](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary) [![](https://img.shields.io/badge/chat-slack-blueviolet.svg)](https://join.slack.com/t/simplestatemachine/shared_invite/zt-fnfhvvsx-fTejcpPn~PPb2ojdG_MQBg) [![](https://img.shields.io/badge/chat-telegram-blue.svg)](https://t.me/joinchat/HMLJFkv9do6aDV188rhd0w)
[![Build Status](https://dev.azure.com/GMIKE/SimpleStateMachineLibrary/_apis/build/status/SimpleStateMachine.SimpleStateMachineLibrary?branchName=master)](https://dev.azure.com/GMIKE/SimpleStateMachineLibrary/_build/latest?definitionId=2&branchName=master)
# SimpleStateMachineLibrary
A C# library for realization simple state-machine on .Net## Give a Star! :star:
If you like or are using this project please give it a star. Thanks!# Why SimpleStateMachine?
Create state machine in **three** steps :**1.** Create scheme in [node editor🔗](https://github.com/SimpleStateMachine/SimpleStateMachineNodeEditor) and load it in your project using [this library📚](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary)
```C#
StateMachine stateMachine = new StateMachine("scheme.xml");
```
**2.** Describe your app logic on events⚡
```C#
stateMachine.GetState("State1").OnExit(Action1);
stateMachine.GetState("State2").OnEntry(Action2);
stateMachine.GetTransition("Transition1").OnInvoke(Action3);
stateMachine.OnChangeState(Action4);
```
**3.** Run the state machine🚘
```C#
stateMachine.Start();
```
## Features💡State machine properties:
* Start state
* Entry/exit events for state
* Invoke event for transition
* Parameters for transitions
* Parameters for entry/exit for stateUseful extensions for work:
* State changed event for state machine
* Data for sharing between states
* Change event for data
* Export/Import to/from XML
* Logging## Getting Started📂
Install from Nuget:
```sh
Install-Package SimpleStateMachineLibrary
```
## Documentation📄
Documentation here: https://github.com/SimpleStateMachine/SimpleStateMachineLibrary/wiki## FAQ❔
If you think you have found a bug, create a github [issue](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary/issues).
But if you just have questions about how to use:
- [Slack channel](https://join.slack.com/t/simplestatemachine/shared_invite/zt-fnfhvvsx-fTejcpPn~PPb2ojdG_MQBg)
- [Telegram channel](https://t.me/joinchat/HMLJFkv9do6aDV188rhd0w)## License📑
Copyright (c) SimpleStateMachine
Licensed under the [MIT](LICENSE) license.