static unsafe void Main(string[] args) { Environment.ExitCode = 0; if (args.Length == 0) { Console.WriteLine("No target specified."); Environment.ExitCode = -1; return; } string target = args[0]; string output = ((args.Length > 1) ? args[1] : null); ImageFile imgFile = new ImageFile(target, output); try { imgFile.Process(); } catch (Exception ex) { Console.WriteLine("Unable to process file: {0}", ex.Message); Environment.ExitCode = -1; } finally { imgFile.Unload(); } }
static unsafe void Main( string[] args ) { Environment.ExitCode = 0; if ( args.Length == 0 ) { Console.WriteLine( "No target specified." ); Environment.ExitCode = -1; return; } string target = args[ 0 ]; string output = ( ( args.Length > 1 ) ? args[ 1 ] : null ); ImageFile imgFile = new ImageFile( target, output ); try { imgFile.Process(); } catch ( Exception ex ) { Console.WriteLine( "Unable to process file: {0}", ex.Message ); Environment.ExitCode = -1; } }
static void Main(string[] args) { Environment.ExitCode = 0; if (args.Length == 0) { Console.WriteLine("No target specified."); Environment.ExitCode = -1; return; } var target = args[0]; var output = args.Length > 1 ? args[1] : null; var imgFile = new ImageFile(target, output); imgFile.Process(); }