示例#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);
            }
        }
示例#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);
         }
     }
 }
示例#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);
         }
     }
 }
示例#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);
            }
        }