public ResultContainer DeepCopy() { var copy = new ResultContainer(); foreach (var r in Results) { copy.Add(r); } return(copy); }
private ResultContainer convertResult(dynamic rawResult, FileInfo file) { var results = new ResultContainer(); foreach (var line in rawResult) { var result = new Result( file, line.Index + 1, line.Value); results.Add(result); } return(results); }
/// <summary> /// ディレクトリー収集 /// </summary> /// <param name="dir">ディレクトリー</param> /// <param name="results">結果コンテナー</param> private void collectDirectory(DirectoryInfo dir, ResultContainer results) { if (this.Worker.CancellationPending) { //this.WorkerEventArgs.Cancel = true; return; } var result = new Result(dir, dir.Name); results.Add(result); this.Worker.ReportProgress(results.Results.Count); }
/// <summary> /// ファイル収集 /// </summary> /// <param name="file">ファイル</param> /// <param name="results">結果コンテナー</param> private void collectFile(FileInfo file, ResultContainer results) { if (this.Worker.CancellationPending) { //this.WorkerEventArgs.Cancel = true; return; } var result = new Result(file, 0, file.Name); results.Add(result); this.Worker.ReportProgress(results.Results.Count); }