Author: jluke
Date: 2005-10-10 21:43:42 -0400 (Mon, 10 Oct 2005)
New Revision: 51541
Modified:
trunk/mcs/tools/monop/ChangeLog
trunk/mcs/tools/monop/monop.cs
trunk/mcs/tools/monop/options.cs
Log:
2005-10-10 John Luke <[EMAIL PROTECTED]>
* monop.cs: add PrintRefs and use it if the
option is set
* options.cs: add PrintRefs option to see the
assemblies referenced by an assembly
Modified: trunk/mcs/tools/monop/ChangeLog
===================================================================
--- trunk/mcs/tools/monop/ChangeLog 2005-10-11 01:32:11 UTC (rev 51540)
+++ trunk/mcs/tools/monop/ChangeLog 2005-10-11 01:43:42 UTC (rev 51541)
@@ -1,5 +1,12 @@
2005-10-10 John Luke <[EMAIL PROTECTED]>
+ * monop.cs: add PrintRefs and use it if the
+ option is set
+ * options.cs: add PrintRefs option to see the
+ assemblies referenced by an assembly
+
+2005-10-10 John Luke <[EMAIL PROTECTED]>
+
* monop.cs: don't print obsolete types if the
--filter-obsolete option is passed
* options.cs: add FilterObsolete option
Modified: trunk/mcs/tools/monop/monop.cs
===================================================================
--- trunk/mcs/tools/monop/monop.cs 2005-10-11 01:32:11 UTC (rev 51540)
+++ trunk/mcs/tools/monop/monop.cs 2005-10-11 01:43:42 UTC (rev 51541)
@@ -198,6 +198,13 @@
return GetType (tname, false);
}
+ static void PrintRefs (string assembly)
+ {
+ Assembly a = GetAssembly (assembly, true);
+ foreach (AssemblyName an in a.GetReferencedAssemblies ())
+ Console.WriteLine (an);
+ }
+
static void PrintTypes (string assembly, bool show_private, bool
filter_obsolete)
{
Assembly a = GetAssembly (assembly, true);
@@ -279,7 +286,10 @@
assembly = options.AssemblyReference;
if (options.Type == null) {
- PrintTypes (assembly, options.ShowPrivate,
options.FilterObsolete);
+ if (options.PrintRefs)
+ PrintRefs (assembly);
+ else
+ PrintTypes (assembly,
options.ShowPrivate, options.FilterObsolete);
return;
}
}
Modified: trunk/mcs/tools/monop/options.cs
===================================================================
--- trunk/mcs/tools/monop/options.cs 2005-10-11 01:32:11 UTC (rev 51540)
+++ trunk/mcs/tools/monop/options.cs 2005-10-11 01:43:42 UTC (rev 51541)
@@ -30,6 +30,7 @@
{
public bool DeclaredOnly = false;
public bool FilterObsolete = false;
+ public bool PrintRefs = false;
public bool Search = false;
public bool ShowPrivate = false;
public string AssemblyReference = null;
@@ -69,6 +70,9 @@
case "--private":
ShowPrivate = true;
break;
+ case "--refs":
+ PrintRefs = true;
+ break;
case "-s":
case "-k":
case "--search":
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches