private void ClassHeader(ConcreteState cs, StringBuilder buff) { buff.AppendLine("/// <summary>") .AppendLine($"/// This class handles the \"{cs.Name}\" state and its events") .AppendLine("/// </summary>") .AppendLine($"internal class {ClassNameFor(cs)} : State") .AppendLine("{"); }
private void GenerateConcreteStateClass(ConcreteState cs, StringBuilder buff) { ClassHeader(cs, buff); PublicProperties(cs, buff); this.gen.SourceState = cs; this.gen.ClearOverRiddenEvents(); GenerateTransitionsOf(cs, buff); CloseClass(buff); }
public void AddBuiltConcreteState(ConcreteState s) { this.itsConcreteStateDictionary.Add(s.Name, s); AddBuiltState(s); }
public ExternalTransition(string theEvent, State theSourceState, ConcreteState nextState) : base(theEvent, theSourceState) { this.NextState = nextState; }
private static void PublicProperties(ConcreteState cs, StringBuilder buff) => buff.AppendLine($" public override string Name => \"{cs.Name}\";");