Ejemplo n.º 1
0
 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("{");
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void AddBuiltConcreteState(ConcreteState s)
 {
     this.itsConcreteStateDictionary.Add(s.Name, s);
     AddBuiltState(s);
 }
Ejemplo n.º 4
0
 public ExternalTransition(string theEvent,
                           State theSourceState, ConcreteState nextState)
     : base(theEvent, theSourceState)
 {
     this.NextState = nextState;
 }
Ejemplo n.º 5
0
 private static void PublicProperties(ConcreteState cs, StringBuilder buff) => buff.AppendLine($"    public override string Name => \"{cs.Name}\";");