コード例 #1
0
ファイル: Rule.cs プロジェクト: albertjan/Domotics.Base
 /// <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();
 }