Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FantasticFiasco committed Jan 13, 2016
2 parents d1b5b6c + 3eebd47 commit 79918e0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/MvvmDialogs/DialogServiceViews.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Linq;
using System.Windows;
using MvvmDialogs.Logging;
using MvvmDialogs.Properties;
using MvvmDialogs.Views;

namespace MvvmDialogs
Expand Down Expand Up @@ -143,8 +142,8 @@ private static void Unregister(IView view)
{
if (view == null)
throw new ArgumentNullException("view");
if (!InternalViews.Any(registeredView => ReferenceEquals(registeredView.Source, view.Source)))
throw new ArgumentException(Resources.ViewNotRegistered.CurrentFormat(view.GetType()), "view");

PruneInternalViews();

Logger.Write("Unregister view {0}".InvariantFormat(view.Id));
InternalViews.RemoveAll(registeredView => ReferenceEquals(registeredView.Source, view.Source));
Expand Down

0 comments on commit 79918e0

Please sign in to comment.