Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            try
            {
                Adk.Debug = AdkDebugFlags.Moderate;
                Adk.Initialize(SifVersion.LATEST, SIFVariant.SIF_AU, (int)SdoLibraryType.All);

                Chameleon agent;
                agent = new Chameleon();

                //  Start agent...
                agent.StartAgent(args);

                Console.WriteLine("Agent is running (Press Ctrl-C to stop)");
                sWaitMutex = new AdkConsoleWait();
                sWaitMutex.WaitForExit();

                //  Always shutdown the agent on exit
                agent.Shutdown(ProvisioningFlags.None);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Exemplo n.º 2
0
 public ObjectLogger(Chameleon agent)
 {
     fAgent = agent;
     fDir   = Path.Combine(agent.HomeDir, "Chameleon") + "\\";
     if (fAgent.Properties.GetProperty("chameleon.autoClearLog", false))
     {
         try
         {
             DirectoryInfo inf = new DirectoryInfo(fDir);
             if (inf.Exists)
             {
                 inf.Delete(true);
             }
         }
         catch (Exception ex)
         {
             Adk.Log.Error("Error clearing the log files", ex);
         }
     }
 }
Exemplo n.º 3
0
 public ObjectLogger(Chameleon agent)
 {
     fAgent = agent;
     fDir = Path.Combine(agent.HomeDir, "Chameleon") + "\\";
     if (fAgent.Properties.GetProperty("chameleon.autoClearLog", false))
     {
         try
         {
             DirectoryInfo inf = new DirectoryInfo(fDir);
             if (inf.Exists)
             {
                 inf.Delete(true);
             }
         }
         catch (Exception ex)
         {
             Adk.Log.Error("Error clearing the log files", ex);
         }
     }
 }
Exemplo n.º 4
0
        private static void Main(string[] args)
        {
            try
            {
                Adk.Debug = AdkDebugFlags.Moderate;
                Adk.Initialize(SifVersion.LATEST,SIFVariant.SIF_UK, (int)SdoLibraryType.All);
                Chameleon agent;
                agent = new Chameleon();

                //  Start agent...
                agent.StartAgent(args);

                Console.WriteLine("Agent is running (Press Ctrl-C to stop)");
                sWaitMutex = new AdkConsoleWait();
                sWaitMutex.WaitForExit();

                //  Always shutdown the agent on exit
                agent.Shutdown(ProvisioningFlags.None);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }