/// <summary> /// Collects data from the locations indicated by the differences between the <see cref="Start"/> state and the current system state. /// </summary> /// <param name="handler">A callback object used when the the user needs to be informed about IO tasks.</param> /// <exception cref="InvalidOperationException">No installation directory was detected.</exception> /// <exception cref="OperationCanceledException">The user canceled the task.</exception> /// <exception cref="IOException">There was an error accessing the registry or file system.</exception> /// <exception cref="UnauthorizedAccessException">Access to the registry or file system was not permitted.</exception> public void Diff([NotNull] ITaskHandler handler) { #region Sanity checks if (handler == null) throw new ArgumentNullException(nameof(handler)); #endregion _diff = new SnapshotDiff(before: _snapshot, after: Snapshot.Take()); if (string.IsNullOrEmpty(InstallationDir)) InstallationDir = _diff.GetInstallationDir(); _feedBuilder.ImplementationDirectory = InstallationDir; _feedBuilder.DetectCandidates(handler); }
/// <summary> /// Collects data from the locations indicated by the differences between the <see cref="Start"/> state and the current system state. /// </summary> /// <param name="handler">A callback object used when the the user needs to be informed about IO tasks.</param> /// <exception cref="InvalidOperationException">No installation directory was detected.</exception> /// <exception cref="OperationCanceledException">The user canceled the operation.</exception> /// <exception cref="IOException">There was an error accessing the registry or file system.</exception> /// <exception cref="UnauthorizedAccessException">Access to the registry or file system was not permitted.</exception> public void Diff([NotNull] ITaskHandler handler) { #region Sanity checks if (handler == null) { throw new ArgumentNullException("handler"); } #endregion _diff = new SnapshotDiff(before: _snapshot, after: Snapshot.Take()); if (string.IsNullOrEmpty(InstallationDir)) { InstallationDir = _diff.GetInstallationDir(); } _feedBuilder.ImplementationDirectory = InstallationDir; _feedBuilder.DetectCandidates(handler); }