Example #1
0
        static int Main(string[] args)
        {
            ResourceFileSorter fileSorter = null;

            if (args.Length <= 0)
            {
                return(1);
            }

            if (!CheckArgs(args[0]))
            {
                return(1);
            }

            try
            {
                fileSorter = new ResourceFileSorter(args[0]);
                fileSorter.Sort();
            }
            catch (Exception)
            {
                Console.WriteLine("================================");
                Console.WriteLine("Could not sort resources. Abort.");
            }
            return(0);
        }
Example #2
0
        static int Main(string[] args)
        {
            if (args.Length <= 0)
            {
                PrintUsage("<none>");
                return((int)ReturnCodes.Help);
            }

            var filepath = args[0];

            if (!CheckArgs(filepath))
            {
                Console.WriteLine("The file specified '{0}' doesn't exist!", filepath);
                return((int)ReturnCodes.BadArguments);
            }

            try
            {
                var doneSomethingSuccessfully = new ResourceFileSorter(filepath).Sort();
                return((int)(doneSomethingSuccessfully ? ReturnCodes.SuccessFileSorted : ReturnCodes.SuccessButNothingToSort));
            }
            catch (Exception)
            {
                Console.WriteLine("================================");
                Console.WriteLine("Could not sort resources. Abort.");
                return((int)ReturnCodes.ErrorDuringProcessing);
            }
        }
Example #3
0
        static int Main(string[] args)
        {
            ResourceFileSorter fileSorter = null;
                if (args.Length <= 0)
                    return 1;

                if (!CheckArgs(args[0]))
                    return 1;

                try
                {
                    fileSorter = new ResourceFileSorter(args[0]);
                    fileSorter.Sort();
                }
                catch (Exception)
                {
                    Console.WriteLine("================================");
                    Console.WriteLine("Could not sort resources. Abort.");
                }
                return 0;
        }