This repository has been archived by the owner on Jan 10, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for creating playlists.
Fixes #9
- Loading branch information
Showing
5 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
| ||
namespace SpotiFire.SpotifyLib | ||
{ | ||
public interface IPlaylistList : IEditableArray<IContainerPlaylist> | ||
{ | ||
IContainerPlaylist Add(string name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
| ||
using System; | ||
namespace SpotiFire.SpotifyLib | ||
{ | ||
class PlaylistList : DelegateList<IContainerPlaylist>, IPlaylistList | ||
{ | ||
private Func<string, IContainerPlaylist> addNewFunc; | ||
public PlaylistList(Func<int> getLength, Func<int, IContainerPlaylist> getIndex, Action<IContainerPlaylist, int> addFunc, Action<int> removeFunc, Func<bool> readonlyFunc, Func<string, IContainerPlaylist> addNewFunc) | ||
: base(getLength, getIndex, addFunc, removeFunc, readonlyFunc) | ||
{ | ||
|
||
} | ||
|
||
public IContainerPlaylist Add(string name) | ||
{ | ||
return addNewFunc(name); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters