public ImportFolderWatcher(IImportFolderInteractor folder, IMusicInfoReader musicInfoReader, ILibraryRepository library, ITranscoder transcoder ) { _folderInteractor = folder; _musicInfoReader = musicInfoReader; _library = library; _transcoder = transcoder; }
public MediaLibraryFactory( ILibraryRepository libraryRepository, IMetadataService metadataService) { _libraryRepository = libraryRepository; _metadataService = metadataService; }
public AccountController(LibUserManager userManager, LibSignInManager signInManager, ILibraryRepository repo, IAuthenticationManager _authentication) { UserManager = userManager; SignInManager = signInManager; _libraryRepository = repo; authManager = _authentication; }
public Player(Playlist playlist, IAudioInteractor audioInteractor, ILibraryRepository library) { AudioInteractor = audioInteractor; Playlist = playlist; _current = this; Library = library; }
public LibraryController(ILibraryRepository libraryRepository, IUserProfileEntityFactory userProfileEntityFactory, IRecipeDisplayViewModelMapper displayModelMapper) { this._libraryRepository = libraryRepository; this._userProfileEntityFactory = userProfileEntityFactory; this._displayModelMapper = displayModelMapper; }
public void AttachToPlaylist(Playlist playlist, ILibraryRepository library) { _playlist = playlist; _library = library; if (_playlist.Count == 0) { Console.WriteLine("Attaching"); _playlist.AddRange(_library.GetAllMusic().Shuffle(_random).Take(PLAYLIST_SIZE)); } }
public DistributionController( IBookRepository _bookRepository, IBookCopysRepository _repo, ILibraryRepository _libraryRepository, ICurrent _current) { bookRepository = _bookRepository; repo = _repo; libraryRepository = _libraryRepository; current = _current; }
public SongSpider( ILibraryRepository libraryRepository, ISongRepository songRespository, IMusicLibraryFactory factory) { this._libraryRepository = libraryRepository; this._songRespository = songRespository; this._factory = factory; this._thread = new Thread(new ThreadStart(QueueWatcher)); this._thread.Start(); }
// ninject depedency injection public DbRepositoryService(IEventRepository eventRepo, ICenterRepository centerRepo, ILibraryRepository libraryRepo, ISpecialEventRepository specialEventRepo, IPrimaryGuardianBorrowsRepository primaryGuardianBorrowsRepo, ISignInRepository signInRepo, IPrimaryGuardianRepository primaryGuardianRepo, ISecondaryGuardianRepository secondaryGuardianRepo, IChildRepository childRepo, ICenterReferralRepo centerReferralRepo, ICenterResourcesRepository centerResourcesRepo) { this.eventRepo = eventRepo; this.centerRepo = centerRepo; this.libraryRepo = libraryRepo; this.specialEventRepo = specialEventRepo; this.primaryGuardianBorrowsRepo = primaryGuardianBorrowsRepo; this.signInRepo = signInRepo; this.primaryGuardianRepo = primaryGuardianRepo; this.secondaryGuardianRepo = secondaryGuardianRepo; this.childRepo = childRepo; this.centerReferralRepo = centerReferralRepo; this.centerResourcesRepo = centerResourcesRepo; }
private void InsertTestSongs(ILibraryRepository library) { //POC code for playing in the service var testDirectories = new string[] { //@"f:\music\Manchester Orchestra\Mean Everything To Nothing", //@"F:\music\Auf Der Maur\Auf Der Maur", //@"C:\Users\awl\Music\deftones", //@"F:\music\Nine Inch Nails", //@"c:\Shared\Maestro\Music\Manual", //@"C:\Users\awl\Dropbox\Music\Maestro", @"C:\Users\alyons2\Dropbox\Music\Maestro" }; library.ClearLibrary(); foreach(var dir in testDirectories) library.AddDirectoryToLibrary(dir); }
protected override void OnStart(string[] args) { try { //Instantiate the configuration implementation to be used _configuration = ConfigurationFile.Load(); //Instantiate the repository implementation to be used _repository = MsSqlRepository.Load("MsSql"); //Instantiate and start the controller _controller = new LibrarySyncController<ImageFileRepository>(); _controller.Start(_configuration, _repository); } catch (Exception ex) { _log.Fatal("Error starting service.", ex); } }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; // TODO: Add handler for OnSuspending to save the search stuff to localfolder. IF WE CAN???????? // Instantiate the Unity IoC container _ioCcontainer = new UnityContainer(); // Now configure it,set up the mappings UnityConfiguration.RegisterTypes(_ioCcontainer); // Instantiate the Library Repository _libraryRepository = _ioCcontainer.Resolve<ILibraryRepository>(); // INstantiage the Search Repository. _searchRepository = _ioCcontainer.Resolve<ISearchRepository>(); // Instantiate another repository, to check that the lifetime is OK, // it shouldn't run the contructor of the Library module. IT DOESN'T YEH!!!!!!!!!! //var _testRepository = _ioCcontainer.Resolve<ILibraryRepository>(); }
/// <summary> /// Starts the controller. /// </summary> /// <param name="configuration"></param> /// <param name="repository"></param> public void Start(IControllerConfiguration configuration, ILibraryRepository repository) { try { _log.Debug("Starting controller..."); //Store objects internally _configuration = configuration; _repository = repository; //Initialize the controller and get things moving Initialize(); _log.Info("Controller started."); } catch (Exception ex) { _log.Fatal("Error starting controller.", ex); throw ex; } }
public MusicHubBot( IJukebox jukebox, ILibraryRepository libraryRepository, IUserRepository userRepository, IMediaPlayer mediaPlayer, ISongRepository songRepository, IMetadataService metadataService, IKernel kernel, SongSpider spider) { _jukebox = jukebox; _userRepository = userRepository; _libraryRepository = libraryRepository; _mediaPlayer = mediaPlayer; _libraryRepository = libraryRepository; _kernel = kernel; _spider = spider; _jukebox.SongStarted += _jukebox_SongStarted; InitializeChatCommandProcessors(); }
public DefaultJukebox( IMediaPlayer mediaPlayer, IMusicLibraryFactory musicLibraryFactory, ILibraryRepository libraryRepository, ISongRepository songRepository, IAffinityTracker affinityTracker, IUserRepository userRepository, SongSpider spider) { _mediaPlayer = mediaPlayer; _musicLibraryFactory = musicLibraryFactory; _libraryRepository = libraryRepository; _songRepository = songRepository; _spider = spider; _affinityTracker = affinityTracker; _userRepository = userRepository; _mediaPlayer.SongFinished += _mediaPlayer_SongFinished; UpdateAllLibraries(); MarkAllUsersAsAway(); }
/// <summary> /// Saves album cover art images to a target destination directory. /// This method also sets file attributes to normal (removes hidden & system attributes). /// </summary> /// <param name="songs"></param> public void SaveLibraryImages(ILibraryRepository repository) { _log.Debug("Saving library album cover images..."); //Image filename format //AlbumArt_{C8C1D82E-2891-4008-A00C-0264635F01A6}_Large.jpg FileAttributes destFileAttributes = FileAttributes.Normal; foreach (AlbumCoverData albumCoverData in repository.GetAlbumCoverData()) { //Build the path to the source image string sourceFileName = string.Format("AlbumArt_{0}_Large.jpg", albumCoverData.WmCollectionId); string sourceImagePath = Path.Combine(albumCoverData.Directory, sourceFileName); //Build destination image file path string destImagePath = Path.Combine(_targetImageDirPath, Path.ChangeExtension(albumCoverData.Id, ".jpg")); //Check to see if the source file exists if (!File.Exists(sourceImagePath)) { //Check to see if any alternate filenames exist before we log and give up on this album sourceImagePath = Path.Combine(albumCoverData.Directory, "AlbumArtSmall.jpg"); if (!File.Exists(sourceImagePath)) { //We still didn't find the album using the default image, so log it and continue to the next album _log.Warn(string.Format("No album image found for {0}.", albumCoverData.Title)); } } //Copy the file File.Copy(sourceImagePath, destImagePath, true); //Set the file attributes File.SetAttributes(destImagePath, destFileAttributes); } _log.Debug("Library album cover images saved."); }
public BookController(ILibraryRepository repository) { _repo = repository; }
public void AttachToPlaylist(Playlist playlist, ILibraryRepository library) { throw new System.NotImplementedException(); }
public AddPeriodicalRequestHandler(ILibraryRepository libraryRepository, IPeriodicalRepository periodicalRepository) { _libraryRepository = libraryRepository; _periodicalRepository = periodicalRepository; }
public MoviesService(ILibraryRepository libraryRepository, IMapper mapper) { _libraryRepository = libraryRepository; _mapper = mapper; }
public DeleteLibraryRequestHandler(ILibraryRepository libraryRepository, IFileRepository fileRepository, IFileStorage fileStore) { _libraryRepository = libraryRepository; _fileRepository = fileRepository; _fileStore = fileStore; }
public LibrarysController(Storage storage, ILibraryRepository libraryRepository, ILocalizedLibraryRepository localizedLibraryRepository) { this.storage = storage; this.libraryRepository = libraryRepository; this.localizedLibraryRepository = localizedLibraryRepository; }
public AuthorsController(ILibraryRepository libraryRepository) { //Dependency injection _libraryRepository = libraryRepository; }
public UserService(ILibraryRepository repo) { _repo = repo; }
public LibraryController(ILibraryRepository repository) { libraryRepository = repository; }
public AuthorCollectionsController(ILibraryRepository repository) { _repository = repository; }
public ManagerLibrary(ILibraryRepository ilibraryRepository) { this._ilibraryRepository = ilibraryRepository; }
public ImportFolderWatcher(ILibraryRepository library) : this(new ImportFolderInteractor(), new MusicInfoReader(),library, new Transcoder()) { _folderToWatch = System.Configuration.ConfigurationManager.AppSettings["ImportWatchFolder"]; _libraryRootFolder = System.Configuration.ConfigurationManager.AppSettings["LibraryRootFolder"]; }
public void AttachToPlaylist(Playlist playlist, ILibraryRepository library) { _playlist = playlist; }
public AuthorCollectionsController(ILibraryRepository libraryRepository) { _libraryRepository = libraryRepository; }
public AuthorsController(ILibraryRepository libraryRepository, IUrlHelper urlHelper) { _libraryRepository = libraryRepository; _urlHelper = urlHelper; }
public AddArticleContentRequestHandler(IIssueRepository issueRepository, IArticleRepository chapterRepository, IFileStorage fileStorage, ILibraryRepository libraryRepository, IFileRepository fileRepository) { _issueRepository = issueRepository; _articleRepository = chapterRepository; _fileStorage = fileStorage; _libraryRepository = libraryRepository; _fileRepository = fileRepository; }
public LibraryController(ILibraryRepository _repo) { _libraryRepository = _repo; }
public AuthorsService(ILibraryRepository authorsRepository, IMapper mapper) { this.authorsRepository = authorsRepository; this.mapper = mapper; }
public RecommendationService(ILibraryRepository repo) { _repo = repo; }
public BusinessService(ILibraryRepository libraryRepository, IMapper mapper) { _libraryRepository = libraryRepository; _mapper = mapper; }
public AuthorsController(ILibraryRepository libraryRepository) { this._liberaryRepository = libraryRepository; }
public LibraryService(ILibraryRepository repository) { _repository = repository; }
public ImportFolderWatcher(ILibraryRepository library) : this(new ImportFolderInteractor(), new MusicInfoReader(), library, new Transcoder()) { _folderToWatch = System.Configuration.ConfigurationManager.AppSettings["ImportWatchFolder"]; _libraryRootFolder = System.Configuration.ConfigurationManager.AppSettings["LibraryRootFolder"]; }
public StudentDetailController(ILibraryRepository libraryRepository) { _libraryRepository = libraryRepository; }
public ImportFolderWatcher(IImportFolderInteractor folder, IMusicInfoReader musicInfoReader, ILibraryRepository library, ITranscoder transcoder) { _folderInteractor = folder; _musicInfoReader = musicInfoReader; _library = library; _transcoder = transcoder; }
public AuthorContactController(ILibraryRepository libraryRepository) { this.libraryRepository = libraryRepository; }
public LibraryController(ILibraryRepository repo) { _repo = repo; }
public AlumnosController(ILibraryRepository libraryRepository) { _libraryRepository = libraryRepository; }
public LibraryService(ILibraryRepository someRepository) { repository = someRepository; }
public BooksController(ILibraryRepository libraryRepository) { _libraryRepository = libraryRepository; }
public SearchController(ILibraryRepository repository) { _repo = repository; }
public TicketsService(ILibraryRepository libraryRepository, IMapper _mapper) { this._libraryRepository = libraryRepository; this._mapper = _mapper; }
public PublishersController(ILibraryRepository libraryRepository) { _libraryRepository = libraryRepository; }
public BooksController(ILibraryRepository libraryRepository, ILogger <BooksController> logger) { _logger = logger; _libraryRepository = libraryRepository; }
public LibrariesController(ILibraryRepository <Author> libraryRepository) { _libraryRepository = libraryRepository; }
public AuthorsController(ILibraryRepository libraryRepository) { _libraryRespository = libraryRepository; }
public ReviewService(ILibraryRepository repo) { _repo = repo; }
public BooksController(ILibraryRepository libraryRepository, ILogger <BooksController> logger, IUrlHelper urlHelper) { _libraryRepository = libraryRepository; _logger = logger; _urlHelper = urlHelper; }
public CreateLocalLibraryPathHandler(ILibraryRepository mediaSourceRepository) =>