Beispiel #1
0
        /// <summary>
        /// Main function.
        /// </summary>
        /// <param name="args">Command line args.</param>
        private static int Main(string[] args)
        {
            try
            {
                var stopwatch = Stopwatch.StartNew();

                // TODO: Add flags for some parameters.
                if (args.Length == 2)
                {
                    var combiner = new Combiner();
                    combiner.Combine(args[0], args[1]);
                }

                // TODO: Add help output.

                stopwatch.Stop();
                Trace.WriteLine(string.Format("Combine time: {0}", stopwatch.Elapsed));

                if (Debugger.IsAttached)
                {
                    Console.ReadLine();
                }

                return(0);
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Console.WriteLine(e);
                return(1);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Main function.
        /// </summary>
        /// <param name="args">Command line args.</param>
        private static int Main(string[] args)
        {
            try
            {
                var stopwatch = Stopwatch.StartNew();

                // TODO: Add flags for some parameters.
                if (args.Length == 2)
                {
                    var combiner = new Combiner();
                    combiner.Combine(args[0], args[1]);
                }

                // TODO: Add help output.

                stopwatch.Stop();
                Trace.WriteLine(string.Format("Combine time: {0}", stopwatch.Elapsed));

                if (Debugger.IsAttached)
                {
                    Console.ReadLine();
                }

                return 0;
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Console.WriteLine(e);
                return 1;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Main function.
        /// </summary>
        /// <param name="args">Command line args.</param>
        private static int Main(string[] args)
        {
            try
            {
                var stopwatch = Stopwatch.StartNew();

                // TODO: Add flags for some parameters.
                if (args.Length == 2)
                {
                    var sourceFile = args[0];
                    var resultFile = args[1];

                    using (var mutex = Lock(resultFile))
                    {
                        try
                        {
                            var combiner = new Combiner();
                            combiner.Combine(sourceFile, resultFile);
                        }
                        finally
                        {
                            mutex.ReleaseMutex();
                        }
                    }
                }

                // TODO: Add help output.

                stopwatch.Stop();
                Trace.WriteLine(string.Format("Combine time: {0}", stopwatch.Elapsed));

                if (Debugger.IsAttached)
                {
                    Console.ReadLine();
                }

                return(0);
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Console.WriteLine(e);
                return(1);
            }
        }