示例#1
0
        static void Main(string[] args)
        {
            if (args.Length != (int)Args.Expected)
            {
                Console.WriteLine("Wrong number of arguments. Expecting {0}, but got {1} instead.",
                    (int)Args.Expected, args.Length);
                return;
            }

            RSSPub rp = new RSSPub(args[(int)Args.Server]);
            XmlDocument xd = new XmlDocument();
            string xmlFile = args[(int)Args.XmlPath];

            try
            {
                Console.WriteLine("Processing " + xmlFile);
                xd.Load(xmlFile);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception " + e.ToString());
                Console.WriteLine("Exiting...");
                return;
            }

            while (true)
            {
                rp.ProcessRss(xd);
                Thread.Sleep(60 * 1000);
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            if (args.Length != (int)Args.Expected)
            {
                Console.WriteLine("Wrong number of arguments. Expecting {0}, but got {1} instead.",
                                  (int)Args.Expected, args.Length);
                return;
            }

            RSSPub      rp      = new RSSPub(args[(int)Args.Server]);
            XmlDocument xd      = new XmlDocument();
            string      xmlFile = args[(int)Args.XmlPath];

            try
            {
                Console.WriteLine("Processing " + xmlFile);
                xd.Load(xmlFile);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception " + e.ToString());
                Console.WriteLine("Exiting...");
                return;
            }

            while (true)
            {
                rp.ProcessRss(xd);
                Thread.Sleep(60 * 1000);
            }
        }