public static void Main(string[] args) { try { // Pre-parse the command line before initializing the ADK Adk.Debug = AdkDebugFlags.Moderate; AdkExamples.parseCL(null, args); // Initialize the ADK. Note even though this example uses raw XML, // it is still required that the appropriate SDO libraries be loaded Adk.Initialize(AdkExamples.Version, SIFVariant.SIF_US, (int)SdoLibraryType.Student); // Start agent... MappingsDemo agent; agent = new MappingsDemo(); agent.startAgent(args); // Wait for Ctrl-C to be pressed Console.WriteLine(); Console.WriteLine("Agent is running (Press Ctrl-C to stop)"); Console.WriteLine(); // Install a shutdown hook to cleanup when Ctrl+C is pressed new AdkConsoleWait().WaitForExit(); agent.Shutdown (AdkExamples.Unreg ? ProvisioningFlags.Unregister : ProvisioningFlags.None); } catch (Exception e) { Console.WriteLine(e); } }