示例#1
0
        public async Task Add(Playlist playlist, IEnumerable <PlaylistItem> playlistItems)
        {
            using (var task = new AddPlaylistTask(playlist, playlistItems))
            {
                task.InitializeComponent(this.Core);
                await this.OnBackgroundTask(task).ConfigureAwait(false);

                await task.Run().ConfigureAwait(false);
            }
        }
示例#2
0
        public async Task Add(Playlist playlist, LibraryHierarchyNode libraryHierarchyNode)
        {
            using (var task = new AddPlaylistTask(playlist, libraryHierarchyNode))
            {
                task.InitializeComponent(this.Core);
                await this.OnBackgroundTask(task).ConfigureAwait(false);

                await task.Run().ConfigureAwait(false);
            }
        }