public override void Init() { base.Init(); _mediaDeviceService = GlobalContext.GetServices <IMediaDeviceService>().First(); _bitmapDownloadService = GlobalContext.GetServices <IBitmapDownloadService>().First(); }
public override void Init() { base.Init(); _processService = GlobalContext.GetServices <IProcessService>().First(); _bitmapDownloadService = GlobalContext.GetServices <IBitmapDownloadService>().First(); }
internal JsonApi(IBitmapDownloadService bitmapDownloadService) { _bitmapDownloadService = bitmapDownloadService; _jsonApiDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), JsonSubdirectory); _playbackFilePath = Path.Combine(_jsonApiDirectory, JsonApiFile); _updateSync = new AsyncAutoResetEvent(); _updateTask = UpdateAction(); }
internal async Task <PlayingInfo> ToPlayingInfo(IBitmapDownloadService bitmapDownloader) { return(new PlayingInfo(Song.Title, Song.Artist, Song.Album, await bitmapDownloader.GetBitmap(Song.AlbumArt), Playing, TimeSpan.FromSeconds(Time.Total), TimeSpan.FromSeconds(Time.Current))); }
public void InitContext(GlobalContext context) { _bitmapDownloadService = context.GetServices <IBitmapDownloadService>().FirstOrDefault(); }