Пример #1
0
 /// <summary>
 /// Fire the rule to see if things will change.
 /// </summary>
 /// <param name="connection">the concerning connection</param>
 /// <param name="newState">the new state</param>
 public IEnumerable<StateChangeDirective> Fire(Connection connection, State newState)
 {
     Debug.WriteLine("Rule with logic: " + LogicText + " fireing!");
     var scd = Logic.GetNewState(newState, connection, Connections.ToList(), LastTriggered, TimeOfLastChange);
     LastTriggered = DateTime.Now.Ticks;
     if (scd.Any()) TimeOfLastChange = DateTime.Now.Ticks;
     return scd;
 }
Пример #2
0
 public void SetState(Connection connectionid, string statename)
 {
     controller.SetState(connectionid, (State)statename);
 }
Пример #3
0
 public void SetState(Connection connection, string statename)
 {
     throw new System.NotImplementedException();
 }