public void Remove(RecentFile recentFile)
{
if (recentFile == null) { throw new ArgumentNullException(nameof(recentFile)); }
if (recentFiles.Remove(recentFile))
{
recentFile.PropertyChanged -= RecentFilePropertyChanged;
}
else
{
throw new ArgumentException("The passed recentFile was not found in the recent files list.", nameof(recentFile));
}
}