Beispiel #1
0
        /*
         * public void CreatRule(string name, string decription, RuleType type)
         * {
         *  switch (type)
         *  {
         *      case RuleType.Timer:
         *          CreateTimerRule(name, decription);
         *          break;
         *      case RuleType.Сongruence:
         *          CreateСongruenceRule(name, decription);
         *          break;
         *      case RuleType.All:
         *          CreateTimerRule(name, decription);
         *          CreateСongruenceRule(name, decription);
         *          break;
         *      default:
         *          return;
         *  }
         * }
         */
        public void CreateTimerRule(string name, string decription, DateTime criticalEventDate, TimerRuleType type)
        {
            var rule = new TimerRule(name, decription, criticalEventDate, type);

            timerRules.Add(rule);
        }
Beispiel #2
0
 public static IDisposable Subscribe <T>(TimerRule <T> rule, T param, StaticPool pool)
 {
     return(pool.Subscribe <T>(rule, param));
 }
Beispiel #3
0
 public void Init()
 {
     Characters        = new TimerRule <Client.GameClient>(CharactersCallback, 1000, ThreadPriority.BelowNormal);
     ConnectionReceive = new TimerRule <ClientWrapper>(connectionReceive, 1);
     ConnectionSend    = new TimerRule <ClientWrapper>(connectionSend, 1);
 }
Beispiel #4
0
 public static System.IDisposable Subscribe <T>(TimerRule <T> rule, T param)
 {
     return(GenericThreadPool.Subscribe <T>(rule, param));
 }