Exemplo n.º 1
0
        public static bool KillEdi()
        {
            if (ediSvc == null)
            {
                return(true);
            }

            ediSvc.WipeClientInfos();

            wipeTimer.Dispose();
            wipeTimer = null;
            ediSvc.Close();
            ediSvc = null;

            return(true);
        }
Exemplo n.º 2
0
        public static bool StartEdi()
        {
            Log.Info("Edi registration handler starting at port 1999");

            GenSessionId();

            ediSvc = new EdisFace(1999);

            if (!ediSvc.IsAlive)
            {
                ediSvc = null;
                return(false);
            }


            wipeTimer = new Timer(
                new TimerCallback(DailyClientInfoWiper), ediSvc, GetOccurancePeriodInterval(),
                (int)TimeSpan.FromDays(1).TotalMilliseconds);

            Log.Info("Reginfo housekeeper starting..");

            return(true);
        }