public string[] results; // здесь хранятся строки, готовые для слияния public ThreadRunner(CLArgs clargs) { this.clargs = new CLArgs(); this.clargs.inputs = new string[clargs.inputs.Length]; this.clargs = clargs; results = new string[clargs.inputs.Length]; }
public CLArgs Parse(string[] args) { int i = 0; // счетчик номера аргумента if ((args[0] == "-d") || (args[0] == "-a")) { order = args[i++][1]; } else { order = 'a'; } type = args[i++][1]; output = args[i++]; inputLength = args.Length - i; inputs = new string[inputLength]; for (int j = i, k = 0; j < args.Length; j++, k++) { inputs[k] = args[j]; } clargs = new CLArgs(); clargs.inputs = inputs; clargs.output = output; clargs.order = order; clargs.type = type; return(clargs); }
static void Main(string[] args) { CLP clp = new CLP(); CLArgs clargs = clp.Parse(args); ThreadRunner thr = new ThreadRunner(clargs); thr.Merge(thr.Run()); Logger.Free(); }