Example #1
0
 static void Run(Options options)
 {
     List<String> Files = new List<string>();
     foreach (String FilePatterns in options.SourceFiles)
     {
         String Path, Pattern;
         if (FilePatterns.LastIndexOf('\\') > -1)
         {
             Path = FilePatterns.Substring(0, FilePatterns.LastIndexOf('\\'));
             Pattern = FilePatterns.Substring(FilePatterns.LastIndexOf('\\')+1);
         }
         else
         {
             Path = ".";
             Pattern = FilePatterns;
         }
         Files.AddRange(Directory.GetFiles(Path, Pattern).ToList());
     }
     if (Files.Count == 0)
     {
         Console.Error.WriteLine("No Files match.");
         Environment.Exit(1);
     }
     foreach (String SourceFile in Files)
     {
         Convert(SourceFile, options.AddAAC);
         if (Quiting)
         {
             return;
         }
     }
 }
Example #2
0
        static void Main(string[] args)
        {
            var options = new Options();
            ICommandLineParser parser = new CommandLineParser(new CommandLineParserSettings(Console.Error));
            if (!parser.ParseArguments(args, options))
                Environment.Exit(1);

            Run(options);

            Environment.Exit(0);
        }