Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CorCompare.cs « corcompare « tools « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bb956979fe303154b65932bc15d4bbd19cb1007e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Mono.Util.CorCompare.CorCompareDriver
//
// Author(s):
//   Nick Drochak (ndrochak@gol.com)
//
// (C) 2001-2002 Nick Drochak

using System;
using System.IO;

namespace Mono.Util.CorCompare {

	/// <summary>
	/// 	Handles command line arguments, and generates appropriate report(s) 
	/// 	based on those arguments
	/// </summary>
	/// <remarks>
	/// 	created by - Nick
	/// 	created on - 2/20/2002 10:43:57 PM
	/// </remarks>
	class CorCompareDriver
	{
		public static void Main(string[] args) {
			// make sure we were called with the proper usage
			if (args.Length < 1) {
				Console.WriteLine("Usage: CorCompare [-t][-n][-x outfile][-ms assembly][-f friendly_name] assembly_to_compare");
				return;
			}

			bool fList = false;
			string strXML = null;
			string strMono = args [args.Length - 1];
			string strMS = null;
			string strFriendly = null;

			for (int i = 0; i < args.Length-1; i++) {
				if (args [i] == "-t") {
					fList = true;
				}
				if (args [i] == "-n") {
				}
				if (args [i] == "-x") {
					strXML = args [++i];
				}
				if (args [i] == "-ms") {
					strMS = args [++i];
				}
				if (args [i] == "-f") {
					strFriendly = args [++i];
				}
			}

			if (strMS == null)
				strMS = Path.GetFileNameWithoutExtension (strMono);

			if (strFriendly == null)
				strFriendly = strMS;

			if (strXML == null)
				strXML = strFriendly + ".xml";

			ToDoAssembly td = ToDoAssembly.Load (strMono, strFriendly, strMS);

			if (fList)
				Console.WriteLine(td.CreateClassListReport());

			if (strXML != null)
				td.CreateXMLReport(strXML);

		}
	}
}