コード例 #1
0
ファイル: FSMStateClasses.cs プロジェクト: yngwie74/smccsharp
 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("{");
 }
コード例 #2
0
ファイル: FSMStateClasses.cs プロジェクト: yngwie74/smccsharp
        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);
        }
コード例 #3
0
 public void AddBuiltConcreteState(ConcreteState s)
 {
     this.itsConcreteStateDictionary.Add(s.Name, s);
     AddBuiltState(s);
 }
コード例 #4
0
 public ExternalTransition(string theEvent,
                           State theSourceState, ConcreteState nextState)
     : base(theEvent, theSourceState)
 {
     this.NextState = nextState;
 }
コード例 #5
0
ファイル: FSMStateClasses.cs プロジェクト: yngwie74/smccsharp
 private static void PublicProperties(ConcreteState cs, StringBuilder buff) => buff.AppendLine($"    public override string Name => \"{cs.Name}\";");