Exemple #1
0
    public static void Main(string[] args)
    {
        string     date = null;
        NewsRipper ripper;

        if (args.Length > 0)
        {
            switch (args[0])
            {
            case "--date":
                date = args[1];
                break;

            case "--get-patches":
                ThreadStart ts = new ThreadStart(NewsRipper.GetMonoPatches);
                Thread      t  = new Thread(ts);
                t.Start();
                return;

            case "--help":
                Usage();
                break;

            case "--parse-patches":
                ParsePatches();
                break;

            default:
                Console.WriteLine("Unknow argument");
                break;
            }
        }

        ripper = new NewsRipper();
        if (date != null)
        {
            SetDate(date);
        }
    }
Exemple #2
0
	public static void Main (string[] args)
	{
		string date = null;
		NewsRipper ripper;
		if (args.Length > 0) {
			switch (args[0])
			{
			case "--date":
				date = args[1];
				break;
			case "--get-patches":
				ThreadStart ts = new ThreadStart (NewsRipper.GetMonoPatches);
				Thread t = new Thread (ts);
				t.Start ();
				return;
			case "--help":
				Usage ();
				break;
			case "--parse-patches":
				ParsePatches ();
				break;
			default:
				Console.WriteLine ("Unknow argument");
				break;
			}
		}
		
		ripper = new NewsRipper ();
		if (date != null)
			SetDate (date);
	}