Exemplo n.º 1
0
        /// <summary>
        /// Defines the entry point of the application.
        /// </summary>
        /// <param name="args">Command line arguments</param>
        private static void Main(string[] args)
        {
            Trace.Listeners.Add(consoleTracer);
            Trace.WriteLine("Starting...");

            // parse command line arguments
            foreach (string sCmd in args)
            {
                string[] parts = sCmd.Split('=');
                switch (parts[0].ToUpperInvariant())
                {
                case "SERVER":
                    serverAddress = parts[1];
                    break;
                }
            }

            try
            {
                using (var plugin = new HSPI_WUWeather.HSPI())
                {
                    plugin.Connect(serverAddress, serverPort);
                    plugin.WaitforShutDownOrDisconnect();
                }
            }
            finally
            {
                Trace.WriteLine("Bye!!!");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Defines the entry point of the application.
        /// </summary>
        /// <param name="args">Command line arguments</param>
        private static void Main(string[] args)
        {
            // parse command line arguments
            foreach (string sCmd in args)
            {
                string[] parts = sCmd.Split('=');
                switch (parts[0].ToUpperInvariant())
                {
                case "SERVER":
                    serverAddress = parts[1];
                    break;
                }
            }

            using (var plugin = new HSPI_WUWeather.HSPI())
            {
                plugin.Connect(serverAddress, serverPort);
                plugin.WaitforShutDownOrDisconnect();
            }
        }