Ejemplo n.º 1
0
 /// <summary>
 /// Transition from the current state via the specified trigger.
 /// The target state is determined by the configuration of the current state.
 /// Actions associated with leaving the current state and entering the new one
 /// will be invoked.
 /// </summary>
 /// <typeparam name="TArg0">Type of the first trigger argument.</typeparam>
 /// <typeparam name="TArg1">Type of the second trigger argument.</typeparam>
 /// <param name="arg0">The first argument.</param>
 /// <param name="arg1">The second argument.</param>
 /// <param name="trigger">The trigger to fire.</param>
 /// <exception cref="System.InvalidOperationException">The current state does
 /// not allow the trigger to be fired.</exception>
 public void Fire <TArg0, TArg1>(TriggerWithParameters <TArg0, TArg1> trigger, TArg0 arg0, TArg1 arg1)
 {
     Enforce.ArgumentNotNull(trigger, "trigger");
     InternalFire(trigger.Trigger, arg0, arg1);
 }
            /// <summary>
            /// Ensure that the supplied arguments are compatible with those configured for this
            /// trigger.
            /// </summary>
            /// <param name="args"></param>
            public void ValidateParameters(object[] args)
            {
                Enforce.ArgumentNotNull(args, "args");

                ParameterConversion.Validate(args, m_argumentTypes);
            }