title: Is there a simple .NET code generator for a Event-driven finite state machine?
body: <p>Is there a simple .NET code generator for a Event-driven finite state machine?</p>
  
  <p>I am tired of doing this by hand for user-interface objects. I just need the enum definition, the switch statement, and each function call. I do not need a "library".</p>
  
  <p>See <em>Event-driven finite state machine</em> at <a href="http://en.wikipedia.org/wiki/Event_driven_finite_state_machine" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Event_driven_finite_state_machine</a>.</p>
  
  <p><em>State Machines in C# 3.0 using T4 Templates</em> at <a href="http://aabs.wordpress.com/2008/06/26/state-machines-in-c-30-using-t4-templates/" rel="nofollow noreferrer">http://aabs.wordpress.com/2008/06/26/state-machines-in-c-30-using-t4-templates/</a> seems like it is what I want but the link to the example code is broken.</p>