static void Main(string[] args) { var getopt = new Getopt(Assembly.GetExecutingAssembly().GetName().Name, args, "f:r:s:tv") { Opterr = false }; string funcname = null; string resourcesPath = null; string filesPath = null; bool topOnly = false; bool verbose = false; int option; while (-1 != (option = getopt.getopt())) { switch (option) { case 'f': funcname = getopt.Optarg; break; case 'r': resourcesPath = getopt.Optarg; break; case 's': filesPath = getopt.Optarg; break; case 't': topOnly = true; break; case 'v': verbose = true; break; default: PrintUsage(); return; } } if (resourcesPath == null || filesPath == null) { PrintUsage(); return; } var replacer = new Replacer(filesPath, resourcesPath, funcname, topOnly, verbose); replacer.Run(); }
static void Main(string[] args) { var getopt = new Getopt(Assembly.GetExecutingAssembly().GetName().Name, args, "f:r:s:tv") { Opterr = false }; string funcname = null; string resourcesPath = null; string filesPath = null; bool topOnly = false; bool verbose = false; int option; while (-1 != (option = getopt.getopt())) { switch (option) { case 'f': funcname = getopt.Optarg; break; case 'r': resourcesPath = getopt.Optarg; break; case 's': filesPath = getopt.Optarg; break; case 't': topOnly = true; break; case 'v': verbose = true; break; default: PrintUsage(); return; } } if (resourcesPath == null || filesPath == null) { PrintUsage(); return; } var replacer = new Replacer(filesPath, resourcesPath, funcname, topOnly, verbose); replacer.Run(); }