public Playlist(IAudioPlayer player, ICurrentMixProvider mixProvider, IMessenger messenger) { if (mixProvider == null) throw new ArgumentNullException("mixProvider"); if (messenger == null) throw new ArgumentNullException("messenger"); this.player = player; this.mixProvider = mixProvider; }
public GuardUnsavedChangesService( IDispatcherMessenger messenger, ICurrentMixProvider mixProvider, SaveMixAsCommand saveAsCommand) { if (mixProvider == null) { throw new ArgumentNullException("mixProvider"); } if (saveAsCommand == null) { throw new ArgumentNullException("saveAsCommand"); } this.messenger = messenger; this.mixProvider = mixProvider; this.saveAsCommand = saveAsCommand; messenger.Register<MixLoadedEvent>(this, OnMixLoaded); messenger.Register<MixDirtyEvent>(this, OnMixDirty); messenger.Register<MixSavedEvent>(this, OnMixSaved); }