Author: ankit
Date: 2005-12-08 09:56:23 -0500 (Thu, 08 Dec 2005)
New Revision: 54112

Modified:
   trunk/cecil/ildasm/Mono.Disassembler/Driver.cs
Log:


Modified: trunk/cecil/ildasm/Mono.Disassembler/Driver.cs
===================================================================
--- trunk/cecil/ildasm/Mono.Disassembler/Driver.cs      2005-12-08 12:51:32 UTC 
(rev 54111)
+++ trunk/cecil/ildasm/Mono.Disassembler/Driver.cs      2005-12-08 14:56:23 UTC 
(rev 54112)
@@ -106,22 +106,29 @@
                        sd.DisassembleAssembly (AssemblyFactory.GetAssembly 
(m_assembly), cw);
                }
 
+               string AssemblyName {
+                       get { return m_assembly; }
+                       set {
+                               if (m_assembly != null) {
+                                       m_error = "Multiple input files 
specified !";
+                                       return;
+                               }
+                                       
+                               m_assembly = value;
+                               if (!File.Exists (m_assembly)) {
+                                       m_error = "Specified file does not 
exists !";
+                               }
+                       }
+               }
+
                void Parse (string [] args)
                {
                        string cmd_arg;
                        foreach (string cmd in args) {
                                if (cmd [0] != '-' && cmd [0] != '/') {
-                                       if (m_assembly == null) {
-                                               m_assembly = cmd;
-                                               if (!File.Exists (m_assembly)) {
-                                                       m_error = "Specified 
file does not exists !";
-                                                       break;
-                                               }
-                                               continue;
-                                       } else {
-                                               m_error = "Multiple input files 
specified !";
+                                       AssemblyName = cmd;
+                                       if (m_error != null)
                                                break;
-                                       }
                                }
 
                                switch (GetCommand (cmd, out cmd_arg)) {
@@ -144,6 +151,11 @@
                                case "-version":
                                        Version ();
                                        break;
+                               default:
+                                       if (cmd [0] == '-')
+                                               break;
+                                       AssemblyName = cmd;
+                                       break;  
                                }
                        }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to