SimpleStateMachine / SimpleStateMachineLibrary

📚 A simple library for realization state machines in C# code
MIT License
49 stars 14 forks source link

Code generation #9

Open RomanSoloweow opened 4 years ago

RomanSoloweow commented 4 years ago

Now the user needs to remember what name the transitions and states are described inside the file. And work with them happens like this:

stateMachine.GetState("State1");

And I would like so

stateMachine.State1;

I must say that dynamic will not work, because you still need to remember the name. Some kind of code generation is probably needed here, but so far I have not found a solution.

RomanSoloweow commented 3 years ago

I think we can use SourceGenerator