Ejemplo n.º 1
0
 public ImportFolderWatcher(IImportFolderInteractor folder, IMusicInfoReader musicInfoReader, ILibraryRepository library, ITranscoder transcoder )
 {
     _folderInteractor = folder;
     _musicInfoReader = musicInfoReader;
     _library = library;
     _transcoder = transcoder;
 }
Ejemplo n.º 2
0
 public MediaLibraryFactory(
     ILibraryRepository libraryRepository,
     IMetadataService metadataService)
 {
     _libraryRepository = libraryRepository;
     _metadataService = metadataService;
 }
Ejemplo n.º 3
0
 public AccountController(LibUserManager userManager, LibSignInManager signInManager, ILibraryRepository repo, IAuthenticationManager _authentication)
 {
     UserManager = userManager;
     SignInManager = signInManager;
     _libraryRepository = repo;
     authManager = _authentication;
 }
Ejemplo n.º 4
0
 public Player(Playlist playlist, IAudioInteractor audioInteractor, ILibraryRepository library)
 {
     AudioInteractor = audioInteractor;
     Playlist = playlist;
     _current = this;
     Library = library;
 }
Ejemplo n.º 5
0
 public LibraryController(ILibraryRepository libraryRepository,
     IUserProfileEntityFactory userProfileEntityFactory,
     IRecipeDisplayViewModelMapper displayModelMapper)
 {
     this._libraryRepository = libraryRepository;
     this._userProfileEntityFactory = userProfileEntityFactory;
     this._displayModelMapper = displayModelMapper;
 }
Ejemplo n.º 6
0
        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;
 }
Ejemplo n.º 8
0
        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();
        }
Ejemplo n.º 9
0
 // 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;
 }
Ejemplo n.º 10
0
        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);
              }
        }
Ejemplo n.º 12
0
        /// <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;
              }
        }
Ejemplo n.º 14
0
        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();
        }
Ejemplo n.º 15
0
        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;
 }
Ejemplo n.º 18
0
 public void AttachToPlaylist(Playlist playlist, ILibraryRepository library)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 19
0
 public AddPeriodicalRequestHandler(ILibraryRepository libraryRepository, IPeriodicalRepository periodicalRepository)
 {
     _libraryRepository    = libraryRepository;
     _periodicalRepository = periodicalRepository;
 }
Ejemplo n.º 20
0
 public MoviesService(ILibraryRepository libraryRepository, IMapper mapper)
 {
     _libraryRepository = libraryRepository;
     _mapper            = mapper;
 }
Ejemplo n.º 21
0
 public DeleteLibraryRequestHandler(ILibraryRepository libraryRepository, IFileRepository fileRepository, IFileStorage fileStore)
 {
     _libraryRepository = libraryRepository;
     _fileRepository    = fileRepository;
     _fileStore         = fileStore;
 }
Ejemplo n.º 22
0
 public LibrarysController(Storage storage, ILibraryRepository libraryRepository, ILocalizedLibraryRepository localizedLibraryRepository)
 {
     this.storage                    = storage;
     this.libraryRepository          = libraryRepository;
     this.localizedLibraryRepository = localizedLibraryRepository;
 }
Ejemplo n.º 23
0
 public AuthorsController(ILibraryRepository libraryRepository)
 {
     //Dependency injection
     _libraryRepository = libraryRepository;
 }
Ejemplo n.º 24
0
 public UserService(ILibraryRepository repo)
 {
     _repo = repo;
 }
Ejemplo n.º 25
0
 public LibraryController(ILibraryRepository repository)
 {
     libraryRepository = repository;
 }
 public AuthorCollectionsController(ILibraryRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 27
0
 public ManagerLibrary(ILibraryRepository ilibraryRepository)
 {
     this._ilibraryRepository = ilibraryRepository;
 }
Ejemplo n.º 28
0
 public ImportFolderWatcher(ILibraryRepository library)
     : this(new ImportFolderInteractor(), new MusicInfoReader(),library, new Transcoder())
 {
     _folderToWatch = System.Configuration.ConfigurationManager.AppSettings["ImportWatchFolder"];
     _libraryRootFolder = System.Configuration.ConfigurationManager.AppSettings["LibraryRootFolder"];
 }
Ejemplo n.º 29
0
 public void AttachToPlaylist(Playlist playlist, ILibraryRepository library)
 {
     _playlist = playlist;
 }
Ejemplo n.º 30
0
 public AuthorCollectionsController(ILibraryRepository libraryRepository)
 {
     _libraryRepository = libraryRepository;
 }
Ejemplo n.º 31
0
 public AuthorsController(ILibraryRepository libraryRepository,
                          IUrlHelper urlHelper)
 {
     _libraryRepository = libraryRepository;
     _urlHelper         = urlHelper;
 }
Ejemplo n.º 32
0
 public AddArticleContentRequestHandler(IIssueRepository issueRepository, IArticleRepository chapterRepository, IFileStorage fileStorage, ILibraryRepository libraryRepository, IFileRepository fileRepository)
 {
     _issueRepository   = issueRepository;
     _articleRepository = chapterRepository;
     _fileStorage       = fileStorage;
     _libraryRepository = libraryRepository;
     _fileRepository    = fileRepository;
 }
Ejemplo n.º 33
0
 public LibraryController(ILibraryRepository _repo)
 {
     _libraryRepository = _repo;
 }
Ejemplo n.º 34
0
 public AuthorsService(ILibraryRepository authorsRepository, IMapper mapper)
 {
     this.authorsRepository = authorsRepository;
     this.mapper            = mapper;
 }
Ejemplo n.º 35
0
 public RecommendationService(ILibraryRepository repo)
 {
     _repo = repo;
 }
Ejemplo n.º 36
0
 public BusinessService(ILibraryRepository libraryRepository, IMapper mapper)
 {
     _libraryRepository = libraryRepository;
     _mapper            = mapper;
 }
Ejemplo n.º 37
0
 public AuthorsController(ILibraryRepository libraryRepository)
 {
     this._liberaryRepository = libraryRepository;
 }
Ejemplo n.º 38
0
 public LibraryService(ILibraryRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 39
0
 public ImportFolderWatcher(ILibraryRepository library) : this(new ImportFolderInteractor(), new MusicInfoReader(), library, new Transcoder())
 {
     _folderToWatch     = System.Configuration.ConfigurationManager.AppSettings["ImportWatchFolder"];
     _libraryRootFolder = System.Configuration.ConfigurationManager.AppSettings["LibraryRootFolder"];
 }
Ejemplo n.º 40
0
 public StudentDetailController(ILibraryRepository libraryRepository)
 {
     _libraryRepository = libraryRepository;
 }
Ejemplo n.º 41
0
 public ImportFolderWatcher(IImportFolderInteractor folder, IMusicInfoReader musicInfoReader, ILibraryRepository library, ITranscoder transcoder)
 {
     _folderInteractor = folder;
     _musicInfoReader  = musicInfoReader;
     _library          = library;
     _transcoder       = transcoder;
 }
Ejemplo n.º 42
0
 public AuthorContactController(ILibraryRepository libraryRepository)
 {
     this.libraryRepository = libraryRepository;
 }
Ejemplo n.º 43
0
 public LibraryController(ILibraryRepository repo)
 {
     _repo = repo;
 }
 public AlumnosController(ILibraryRepository libraryRepository)
 {
     _libraryRepository = libraryRepository;
 }
Ejemplo n.º 45
0
 public LibraryService(ILibraryRepository someRepository)
 {
     repository = someRepository;
 }
 public BooksController(ILibraryRepository libraryRepository)
 {
     _libraryRepository = libraryRepository;
 }
 public SearchController(ILibraryRepository repository)
 {
     _repo = repository;
 }
Ejemplo n.º 48
0
 public TicketsService(ILibraryRepository libraryRepository, IMapper _mapper)
 {
     this._libraryRepository = libraryRepository;
     this._mapper            = _mapper;
 }
Ejemplo n.º 49
0
 public PublishersController(ILibraryRepository libraryRepository)
 {
     _libraryRepository = libraryRepository;
 }
Ejemplo n.º 50
0
 public BooksController(ILibraryRepository libraryRepository,
                        ILogger <BooksController> logger)
 {
     _logger            = logger;
     _libraryRepository = libraryRepository;
 }
 public LibrariesController(ILibraryRepository <Author> libraryRepository)
 {
     _libraryRepository = libraryRepository;
 }
Ejemplo n.º 52
0
 public AuthorsController(ILibraryRepository libraryRepository)
 {
     _libraryRespository = libraryRepository;
 }
Ejemplo n.º 53
0
 public ReviewService(ILibraryRepository repo)
 {
     _repo = repo;
 }
 public BooksController(ILibraryRepository libraryRepository, ILogger <BooksController> logger, IUrlHelper urlHelper)
 {
     _libraryRepository = libraryRepository;
     _logger            = logger;
     _urlHelper         = urlHelper;
 }
Ejemplo n.º 55
0
 public CreateLocalLibraryPathHandler(ILibraryRepository mediaSourceRepository) =>