public void DetectCandidates(ITaskHandler handler) { #region Sanity checks if (handler == null) throw new ArgumentNullException(nameof(handler)); if (string.IsNullOrEmpty(ImplementationDirectory)) throw new InvalidOperationException("Implementation directory is not set."); #endregion _candidates.Clear(); handler.RunTask(new SimpleTask(Resources.DetectingCandidates, () => _candidates.AddRange(Detection.ListCandidates(new DirectoryInfo(ImplementationDirectory))))); MainCandidate = _candidates.FirstOrDefault(); } #endregion
public void TestDetectCandidates() { _builder.ImplementationDirectory = _implementationDir; _builder.DetectCandidates(new SilentTaskHandler()); }