public MusicHubIdentity(MusicHub.User user) { if (user == null) throw new ArgumentNullException("user"); this.User = user; }
public void updateCurrentSong(MusicHub.Song song) { this._clients.updateCurrentSong(new { song = ConvertSong(song), }); }
public MusicControl( MusicHub.IUserRepository userRepository, MusicHub.IMediaPlayer mediaServer, MusicHub.ILibraryRepository libraryRepository, MusicHub.IConnectionRepository connectionRepository, MusicHub.ISongRepository songRepository, MusicHub.IJukebox jukebox, Website.Models.MediaLibraryFactory mediaLibraryFactory) { this._userRepository = userRepository; this._mediaServer = mediaServer; this._libraryRepository = libraryRepository; this._connectionRepository = connectionRepository; this._songRepository = songRepository; this._mediaLibraryFactory = mediaLibraryFactory; this._jukebox = jukebox; }
private object ConvertSong(MusicHub.Song song) { if (song == null) return null; return new { title = song.Title, artist = song.Artist, }; }
public HomeController( MusicHub.IJukebox jukebox) { this._jukebox = jukebox; }
public FileSystemMusicLibrary(string rootFolder, MusicHub.IMetadataService metadataService) { this._metadataService = metadataService; this._rootFolder = rootFolder; }