C# Console HelloVMx Example

minimal .NET host for ComponentVM lifecycle, hub messages, and model equality

C# Console HelloVMx Example minimal .NET host for ComponentVM lifecycle, hub messages, and model equality C# Console HelloVMx Example minimal .NET host for ComponentVM lifecycle, hub messages, and model equality Host and adapter boundary VMx-owned application state Verification and modeling rule Console program Program.cs entrypoint net8.0 command stdout narrative Message subscriptions hub observers status/property logs no UI framework User gestures events become VM calls no domain state in host render from VM snapshots Run surface local example command smoke-friendly path documented README entry ComponentVM<UserModel> builder-created VM name + modeled hint construct/destruct/dispose UserModel projection Alice -> Bob mutation equality guard modeled hint update MessageHub ConstructionStatusChanged PropertyChanged hot message stream UserModel name age value equality Manual smoke dotnet run observable log sequence roll-forward note Best-fit use Use this when learning the smallest VMx surface before adding host adapters or child containers. Reading rule Follow arrows top to bottom: host input becomes VMx commands; VMx state publishes renderable projections back to the host. binds routes runs owns projects executes loads children commands data tests boundary

Smallest surface

  • One modeled ComponentVM shows lifecycle and property messages.
  • The host never owns domain behavior.

Signal path

  • Model mutation publishes through the hub.
  • Setting an equal model value stays silent.

Next step

  • Move to WPF or Avalonia examples when bindings and child VMs matter.