using System.Collections.Generic;
IEnumerable<IState> Transitions { get; }
public class Stop : IState
private static Stop _instance = new Stop();
private static IState[] _empty = new IState[0];
public Stop Instance => _instance;
public IEnumerable<IState> Transitions => _empty;
public class Passthru : IState
public IEnumerable<IState> Transitions
get { if (_next != null) yield return _next; }
public class Decide : IState
public IEnumerable<IState> Transitions
if (_yes != null) yield return _yes;
if (_no != null) yield return _no;