static void Main(string[] args) { try { ProcessCommandLineInfo processCommandLineInfo = new ProcessCommandLine().Process(args); LanguageWriterBase.CrossPlatformSerializationSupport = processCommandLineInfo.CrossPlatformSerializationSupport; foreach (string sourceFile in processCommandLineInfo.SourceFiles) { try { CodeGenDom codeGenerator = new CodeGenDom(processCommandLineInfo.OutputDirectory); codeGenerator.GenerateCode(sourceFile, "", processCommandLineInfo.TargetLanguage); } catch (Exception x) { Console.WriteLine(String.Format("Code gen exception for file : {0}", sourceFile)); Console.WriteLine(x.ToString()); } } } catch (Exception x) { ProcessCommandLine.DisplayUsage(); Console.WriteLine(x.ToString()); } }