public static Library CreateLibraryWithPlaylist(string playlistName = "Playlist", ILibrarySettings settings = null) { var library = CreateLibrary(settings); library.AddAndSwitchToPlaylist(playlistName); return library; }
public static Library CreateLibrary(ILibrarySettings settings = null) { return(new Library( new Mock <IRemovableDriveWatcher>().Object, new Mock <ILibraryReader>().Object, new Mock <ILibraryWriter>().Object, settings ?? new Mock <ILibrarySettings>().SetupAllProperties().Object)); }
public static Library CreateLibrary(ILibrarySettings settings = null) { return new Library( new Mock<IRemovableDriveWatcher>().Object, new Mock<ILibraryReader>().Object, new Mock<ILibraryWriter>().Object, settings ?? new Mock<ILibrarySettings>().SetupAllProperties().Object); }
public Library(IRemovableDriveWatcher driveWatcher, ILibraryReader libraryReader, ILibraryWriter libraryWriter, ILibrarySettings settings) { this.songLock = new object(); this.songs = new HashSet<Song>(); this.playlists = new List<Playlist>(); this.AccessMode = AccessMode.Administrator; // We want implicit to be the administrator, till we change to user mode manually this.cacheResetHandle = new AutoResetEvent(false); this.driveWatcher = driveWatcher; this.libraryReader = libraryReader; this.libraryWriter = libraryWriter; this.disposeLock = new object(); this.settings = settings; }
public Library(IRemovableDriveWatcher driveWatcher, ILibraryReader libraryReader, ILibraryWriter libraryWriter, ILibrarySettings settings) { this.songLock = new object(); this.songs = new HashSet <Song>(); this.playlists = new List <Playlist>(); this.AccessMode = AccessMode.Administrator; // We want implicit to be the administrator, till we change to user mode manually this.cacheResetHandle = new AutoResetEvent(false); this.driveWatcher = driveWatcher; this.libraryReader = libraryReader; this.libraryWriter = libraryWriter; this.disposeLock = new object(); this.settings = settings; }
public static Library CreateLibraryWithPlaylist(string playlistName = "Playlist", ILibrarySettings settings = null) { var library = CreateLibrary(settings); library.AddAndSwitchToPlaylist(playlistName); return(library); }