Skip to content

Instantly share code, notes, and snippets.

@josellm
josellm / MyStateMachine.cs
Last active January 19, 2022 13:19
Reusing stateless state machine for different instances
using Stateless;
using System;
using System.Collections.Generic;
using System.Linq;
namespace WorkFlow {
public class MyStateMachine<T, TTrigger> {
private readonly static object locker = new object();
private readonly T _element;