/// <summary> /// Returns the available triggers available given the current state of a model, and a state machine /// </summary> /// <typeparam name="TStateModel"></typeparam> /// <param name="model">model containing current state</param> /// <param name="stateMachine">state machine with which to process</param> /// <returns></returns> public static IEnumerable <Trigger> AvailableTriggers <TStateModel>(this IStateModel model, IStateMachine <TStateModel> stateMachine) where TStateModel : IStateModel { if (model == null) { throw new ArgumentNullException("model"); } if (stateMachine == null) { throw new ArgumentNullException("stateMachine"); } return(stateMachine.AvailableTriggers((TStateModel)model)); }