From fb96548db2e8d41f612731bef887664716e72380 Mon Sep 17 00:00:00 2001 From: Marc Hernandez Date: Fri, 17 Oct 2025 01:42:06 -0700 Subject: [PATCH] Fixup use of using on short namespaces --- imm/FSM.cs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/imm/FSM.cs b/imm/FSM.cs index 3b5991b..33e163b 100644 --- a/imm/FSM.cs +++ b/imm/FSM.cs @@ -2,28 +2,27 @@ using System; using System.Runtime.CompilerServices; -using imm; // Ensure this namespace is available /// /// Base context for an FSM. -/// MUST inherit from Recorded or Timed in your concrete class. +/// MUST inherit from imm.Recorded or Timed in your concrete class. /// /// The concrete Context type. -public abstract record class FsmContextBase : Recorded +public abstract record class FsmContextBase : imm.Recorded where TSelf : FsmContextBase { // Required for 'with' expressions. - protected FsmContextBase(Recorded original) : base(original) { } + protected FsmContextBase(imm.Recorded original) : base(original) { } protected FsmContextBase() { } } /// /// Base state for an FSM. -/// MUST inherit from Recorded or Timed in your concrete class. +/// MUST inherit from imm.Recorded or Timed in your concrete class. /// /// The concrete State type. /// The concrete Context type (must be based on FsmContextBase). -public abstract record class FsmStateBase : Recorded +public abstract record class FsmStateBase : imm.Recorded where TSelf : FsmStateBase where TCtx : FsmContextBase { @@ -44,18 +43,18 @@ public abstract record class FsmStateBase : Recorded } // Required for 'with' expressions. - protected FsmStateBase(Recorded original) : base(original) { } + protected FsmStateBase(imm.Recorded original) : base(original) { } protected FsmStateBase() { } } /// /// An immutable FSM base class. -/// MUST inherit from Recorded or Timed in your concrete class. +/// MUST inherit from imm.Recorded or Timed in your concrete class. /// /// The concrete FSM type. /// The concrete State type. /// The concrete Context type. -public abstract record class FsmBase : Recorded +public abstract record class FsmBase : imm.Recorded where TSelf : FsmBase where TState : FsmStateBase where TCtx : FsmContextBase @@ -70,7 +69,7 @@ public abstract record class FsmBase : Recorded } // Required for 'with' expressions. - protected FsmBase(Recorded original) : base(original) + protected FsmBase(imm.Recorded original) : base(original) { var o = original as FsmBase; Context = o!.Context; @@ -79,7 +78,7 @@ public abstract record class FsmBase : Recorded /// /// Transitions the FSM. It automatically uses the 'Process' - /// method appropriate for Recorded or Timed, thanks to virtual overrides. + /// method appropriate for imm.Recorded or Timed, thanks to virtual overrides. /// public TSelf Transition( TState newState, @@ -94,7 +93,7 @@ public abstract record class FsmBase : Recorded var (ctxAfterExit, stateAfterExit) = State.OnExit(Context, newState); var (ctxAfterEnter, stateAfterEnter) = newState.OnEnter(ctxAfterExit, stateAfterExit); - // Since 'this' is at least 'Recorded', we can call the + // Since 'this' is at least 'imm.Recorded', we can call the // detailed 'Process'. If 'this' is actually 'Timed', C#'s // virtual dispatch will call the 'Timed' override automatically. return Process(