/// <summary> /// Initializes a new instance of the <see cref="Playlists"/> class. /// </summary> /// <param name="log">The log.</param> /// <param name="repo">The repo.</param> /// <param name="dialogViewModel">The dialog view model.</param> public Playlists(ILocalizationService translationService, IMapleLog log, IPlaylistMapper playlistMapper, Func <IMediaRepository> repo, ISequenceProvider sequenceProvider) : base(log, translationService, sequenceProvider) { _repositoryFactory = repo ?? throw new ArgumentNullException(nameof(repo)); _playlistMapper = playlistMapper ?? throw new ArgumentNullException(nameof(playlistMapper)); AddCommand = new RelayCommand(Add, CanAdd); }
public UrlParseResult(IMapleLog log, Core.Playlist item, ParseResultType type) : this(log, type) { Playlists = new List <Core.Playlist>() { item }; Log(); }
public UrlParseResult(IMapleLog log, Core.MediaItem item, ParseResultType type) : this(log, type) { MediaItems = new List <Core.MediaItem>() { item }; Log(); }
/// <summary> /// Initializes a new instance of the <see cref="MediaPlayers"/> class. /// </summary> /// <param name="manager">The manager.</param> /// <param name="playerFactory">The player factory.</param> /// <param name="repo">The repo.</param> /// <param name="devices">The devices.</param> /// <param name="dialog">The dialog.</param> public MediaPlayers(IMapleLog log, ILocalizationService translationService, IMediaPlayerMapper mediaPlayerMapper, Func <IMediaPlayer> playerFactory, Func <IMediaRepository> repo, AudioDevices devices, DialogViewModel dialog, ISequenceProvider sequenceProvider) : base(log, translationService, sequenceProvider) { _playerFactory = playerFactory ?? throw new ArgumentNullException(nameof(playerFactory)); _devices = devices ?? throw new ArgumentNullException(nameof(devices)); _dialog = dialog ?? throw new ArgumentNullException(nameof(dialog)); _repositoryFactory = repo ?? throw new ArgumentNullException(nameof(repo)); _mediaPlayerMapper = mediaPlayerMapper ?? throw new ArgumentNullException(nameof(mediaPlayerMapper)); }
public NotifyTaskCompletion(Task <TResult> task, IMapleLog log) { _task = task ?? throw new ArgumentNullException(nameof(task)); _log = log ?? throw new ArgumentNullException(nameof(log)); if (!task.IsCompleted) { var _ = WatchTaskAsync(task); } }
public NAudioMediaPlayer(IMapleLog log) : base() { _log = log; _settings = new MediaFoundationReader.MediaFoundationReaderSettings { RepositionInRead = true, SingleReaderObject = false, RequestFloatOutput = false, }; AudioDeviceChanging += OnAudioDeviceChanging; AudioDeviceChanged += OnAudioDeviceChanged; _player = WavePlayerFactory.GetPlayer(); _player.PlaybackStopped += PlaybackStopped; PlayingMediaItem += OnPlaybackStarted; OnPropertyChanged(nameof(VolumeMin)); OnPropertyChanged(nameof(VolumeMax)); }
public SequenceService(IMapleLog log) { _log = log ?? throw new ArgumentNullException(nameof(log)); }
public UrlParseResult(IMapleLog log, List <Core.MediaItem> items, ParseResultType type) : this(log, type) { MediaItems = items; Log(); }
public LocalizationService(ITranslationProvider provider, IMapleLog log) { _log = log ?? throw new ArgumentNullException(nameof(log)); TranslationProvider = provider ?? throw new ArgumentNullException(nameof(provider)); _currentLanguage = Thread.CurrentThread.CurrentUICulture; }
public SplashScreenViewModel(IMapleLog log, IVersionService version) : this(log) { Version = version.Get(); InitializeCommands(); }
private SplashScreenViewModel(IMapleLog log) : this() { _log = log ?? throw new ArgumentNullException(nameof(log)); _log.LogMessageReceived += LogMessageReceived; }
public BaseMapper(ILocalizationService translationService, ISequenceProvider sequenceProvider, IMapleLog log, IValidator <T> validator) { _translationService = translationService ?? throw new ArgumentNullException(nameof(translationService)); _sequenceProvider = sequenceProvider ?? throw new ArgumentNullException(nameof(sequenceProvider)); _log = log ?? throw new ArgumentNullException(nameof(log)); _validator = validator ?? throw new ArgumentNullException(nameof(validator)); }
/// <summary> /// Initializes a new instance of the <see cref="PlaylistMapper"/> class. /// </summary> /// <param name="dialogViewModel">The dialog view model.</param> public PlaylistMapper(IMediaItemMapper mediaItemMapper, DialogViewModel dialogViewModel, ILocalizationService translator, ISequenceProvider sequenceProvider, IMapleLog log, IValidator <Playlist> validator) : base(translator, sequenceProvider, log, validator) { _dialogViewModel = dialogViewModel ?? throw new ArgumentNullException(nameof(dialogViewModel)); _mediaItemMapper = mediaItemMapper ?? throw new ArgumentNullException(nameof(mediaItemMapper)); InitializeMapper(); }
public MediaPlayerMapper(ILocalizationService translator, IMediaPlayer mediaPlayer, AudioDevices devices, ISequenceProvider sequenceProvider, IMapleLog log, IValidator <MediaPlayer> validator) : base(translator, sequenceProvider, log, validator) { _mediaPlayer = mediaPlayer ?? throw new ArgumentNullException(nameof(mediaPlayer)); _devices = devices ?? throw new ArgumentNullException(nameof(devices)); InitializeMapper(); }
public BaseDataListViewModel(IMapleLog log, ILocalizationService translationService, ISequenceProvider sequenceProvider) { _log = log ?? throw new ArgumentNullException(nameof(log)); _translationService = translationService ?? throw new ArgumentNullException(nameof(translationService)); _sequenceProvider = sequenceProvider ?? throw new ArgumentNullException(nameof(sequenceProvider)); }
public UrlParseService(IMapleLog log) { _log = log; }
public MediaItems(IMapleLog log, ILocalizationService translationService, ISequenceProvider sequenceProvider, IMediaItemMapper mediaItemMapper, Func <IMediaRepository> repo) : base(log, translationService, sequenceProvider) { _repositoryFactory = repo ?? throw new ArgumentNullException(nameof(repo)); _mediaItemMapper = mediaItemMapper ?? throw new ArgumentNullException(nameof(mediaItemMapper)); }
/// <summary> /// Initializes a new instance of the <see cref="Scenes"/> class. /// </summary> /// <param name="manager">The manager.</param> /// <param name="log">The log.</param> public Scenes(ILocalizationService manager, IMapleLog log) { _manager = manager ?? throw new ArgumentNullException(nameof(manager)); _log = log ?? throw new ArgumentNullException(nameof(log)); var content = new[] { new Scene(_manager) { Content = new MediaPlayerPage(_manager), Key = nameof(Resources.Playback), IsSelected = true, Sequence = 100, }, new Scene(_manager) { Content = new PlaylistsPage(_manager), Key = nameof(Resources.Playlists), IsSelected = false, Sequence = 300, }, new Scene(_manager) { Content = new ColorOptionsPage(_manager), Key = nameof(Resources.Themes), IsSelected = false, Sequence = 500, }, new Scene(_manager) { Content = new OptionsPage(_manager), Key = nameof(Resources.Options), IsSelected = false, Sequence = 600, }, new Scene(_manager) { Content = new MediaPlayersPage(_manager), Key = nameof(Resources.Director), IsSelected = false, Sequence = 150, }, }; using (_busyStack.GetToken()) { AddRange(content); SelectedItem = Items[0]; using (View.DeferRefresh()) { View.SortDescriptions.Add(new SortDescription(nameof(Scene.Sequence), ListSortDirection.Ascending)); } } InitializeCommands(); }
/// <summary> /// Initializes a new instance of the <see cref="MediaItemMapper"/> class. /// </summary> public MediaItemMapper(IPlaylistContext context, ILocalizationService translator, ISequenceProvider sequenceProvider, IMapleLog log, IValidator <MediaItem> validator) : base(translator, sequenceProvider, log, validator) { _context = context ?? throw new ArgumentNullException(nameof(context)); InitializeMapper(); }
/// <summary> /// essentially no data was returned, when using this constructor /// </summary> public UrlParseResult(IMapleLog log, ParseResultType type = ParseResultType.None) : this(log) { Type = type; }
public Service(IMapleLog log) { _log = log; }
public UrlParseResult(IMapleLog log, List <Core.Playlist> items, ParseResultType type) : this(log, type) { Playlists = items; Log(); }