appccelerate / statemachine

A .net library that lets you build state machines (hierarchical, async with fluent definition syntax and reporting capabilities).
Apache License 2.0
496 stars 129 forks source link

Move IState, IStateMachineReport, Transitions to Infrastructure (or other) namespace. #38

Closed frankhommers closed 6 years ago

frankhommers commented 6 years ago

I am writing my own Report Generator. I want it to be able to report on AsyncMachines as well as Non Async Machines. Now I need to copy/paste the class because the only thing that differs between them is the namespace. I think some stuff needs to be moved around so that Async and non Async Machine uses the same IState, IStateMachineReport, Transitions and maybe others I forgot.

What do you think?

ursenzler commented 6 years ago

Yes, that is a problem. Some types are equal, some types differ slightly in their signatures. I have no idea, how to solve this elegantly.

frankhommers commented 6 years ago

I would start by putting the types that have the same sig in the same namespace. That would solve a lot.

ursenzler commented 6 years ago

That sounds like a good idea. If you could provide a pull request that would be very much appreciated.

frankhommers commented 6 years ago

Unfortunately for this project I moved to Stateless. Maybe in the future I will reconsider this.