public StatisticsService(
     IStatisticsRepository statisticsRepository,
     IMusicRepository musicRepository)
 {
     _statisticsRepository = statisticsRepository;
     _musicRepository = musicRepository;
 }
 public MusicCommentService(IMusicCommentRepository musicCommentRepository, IMusicRepository musicRepository, IMessageRemindRepository messageRemindRepository, IMusicLikeRepository musicLike)
 {
     _musicCommentRepository = musicCommentRepository;
     _musicRepository = musicRepository;
     _messageRemindRepository = messageRemindRepository;
     _musicLike = musicLike;
 }
Beispiel #3
0
 public HomeController(IMusicRepository musicRepository, ViewModel viewModel, IDetailRepository detailRepository, ICommentRepository commentRepository)
 {
     _musicRepository   = musicRepository;
     _viewModel         = viewModel;
     _detailRepository  = detailRepository;
     _commentRepository = commentRepository;
 }
 public HomeController(IMusicRepository musicRepo, ILogger <HomeController> logger,
                       IWebHostEnvironment env)
 {
     this.musicRepo = musicRepo;
     _logger        = logger;
     _webHostEnv    = env;
 }
Beispiel #5
0
 public MusicAppService(
     IMusicRepository repository,
     MusicValidator validator
     ) : base(repository)
 {
     Validator = validator;
 }
Beispiel #6
0
 public ConnectionManagerController(IMusicRepository musicRepository,
                                    IBaseRespository <ProductEntity> productRepository,
                                    IConfiguration configuration)
 {
     this.musicRepository   = musicRepository;
     this.productRepository = productRepository;
     this.configuration     = configuration;
 }
 public ConversationService(
     IConversationRepository conversationRepository,
     IMusicRepository musicRepository,
     IPlaylistRepository playlistRepository)
 {
     _conversationRepository = conversationRepository;
     _musicRepository = musicRepository;
     _playlistRepository = playlistRepository;
 }
Beispiel #8
0
        public UnitOfWork(DatabaseContext DbContext,
                          IMusicRepository musicsRepository,
                          IArtistRepository artistRepository)
        {
            this._context = DbContext;

            this.Music  = musicsRepository;
            this.Artist = artistRepository;
        }
Beispiel #9
0
 public PKIEncordeService(
     IEthereumService ethereumService,
     IMusicRepository musicRepository,
     IOptions <EthereumSettings> options)
 {
     this.ethereumService = ethereumService;
     this.musicRepository = musicRepository;
     MusicAbi             = options.Value.MusicAbi;
 }
Beispiel #10
0
 public TaskManager(IOptions<MusicOptions> options, IMusicRepository mr, ILogger<TaskManager> logger, ILoggerFactory lf)
 {
     this.messageHandlers = new List<Func<Message, Task>>();
     this.Options = options.Value;
     this.MusicRepository = mr;
     this.Logger = logger;
     this.LoggerFactory = lf;
     Debug.Assert(logger != null);
     Debug.Assert(mr != null);
 }
Beispiel #11
0
        public MusicManagerTests(MusicClassFixture fixture)
        {
            _fixture = fixture;

            _musicRepository = Substitute.For <IMusicRepository>();

            _musicRepository.ClearAll().Returns(true);
            _musicRepository.GetAllArtists().Returns(_fixture.Artists);
            _musicManager = new MusicManager(_musicRepository);
        }
Beispiel #12
0
 public CatalogBusinessServices(IMusicRepository musicRepository,
                                IGenreRepository genreRepository,
                                IArtistRepository artistRepository,
                                IEventBus eventBus)
 {
     _musicRepository  = musicRepository;
     _genreRepository  = genreRepository;
     _artistRepository = artistRepository;
     _eventBus         = eventBus;
 }
Beispiel #13
0
 public UploadService(
     IMusicRepository musicRepository,
     IPlaylistRepository playlistRepository,
     IUserRepository userRepository,
     IConversationRepository conversationRepository)
 {
     _musicRepository = musicRepository;
     _playlistRepository = playlistRepository;
     _userRepository = userRepository;
     _conversationRepository = conversationRepository;
 }
 public MusicUndergroundJob(
     IEthereumService ethereumService,
     IMusicRepository musicRepository,
     IMusicService musicService,
     IOptions <EthereumSettings> options)
 {
     this.ethereumService = ethereumService;
     this.musicRepository = musicRepository;
     this.musicService    = musicService;
     MusicAbi             = options.Value.MusicAbi;
 }
Beispiel #15
0
 public MusicAssetTransferService(
     IMusicRepository musicRepository,
     IMusicAssetTransferRepository musicAssetTransferRepository,
     IEthereumService ethereumService,
     IOptions <EthereumSettings> options)
 {
     this.musicRepository = musicRepository;
     this.musicAssetTransferRepository = musicAssetTransferRepository;
     this.ethereumService  = ethereumService;
     MusicAssetTransferAbi = options.Value.MusicAssetTransferAbi;
 }
 public CatalogBusinessServices(IMusicRepository musicRepository,
                                IGenreRepository genreRepository,
                                IArtistRepository artistRepository,
                                IEventBusPublisher eventBusPublisher,
                                ILogger <CatalogBusinessServices> logger)
 {
     _musicRepository   = musicRepository;
     _genreRepository   = genreRepository;
     _artistRepository  = artistRepository;
     _eventBusPublisher = eventBusPublisher;
     _logger            = logger;
 }
Beispiel #17
0
 public MusicController(ICategoryRepository categoryRepository, IMusicRepository musicRepository,
                        ICommentRepository commentRepository, ViewModel viewModel, zumuziDbContext context, IDetailRepository detailRepository, ILikeRepository likeRepository)
 {
     _viewModel             = viewModel;
     _categoryRepository    = categoryRepository;
     _musicRepository       = musicRepository;
     _musicDetailRepository = musicRepository;
     _commentRepository     = commentRepository;
     _detailRepository      = detailRepository;
     _likeRepository        = likeRepository;
     _context = context;
 }
Beispiel #18
0
 public UploadService(
     IMusicRepository musicRepository,
     IPlaylistRepository playlistRepository,
     IUserRepository userRepository,
     IConversationRepository conversationRepository,
     IRecognitionService recognitionService)
 {
     _musicRepository = musicRepository;
     _playlistRepository = playlistRepository;
     _userRepository = userRepository;
     _conversationRepository = conversationRepository;
     _recognitionService = recognitionService;
 }
        public DataManager(IUserRepository usersRepository, IFriendsRepository friendsRepository, IFriendRequestsRepository friendRequestsRepository, 
            IMessagesRepository messagesRepository, IPictureRepository pictureRepository,IMusicRepository musicRepository,IPostRepository postRepository,
            ICommentRepository commentReposiyory, PrimaryMembershipProvider provider)
        {
            this.usersRepository = usersRepository;
            this.friendsRepository = friendsRepository;
            this.friendRequestsRepository = friendRequestsRepository;
            this.messagesRepository = messagesRepository;
            this.pictureRepository = pictureRepository;
            this.musicRepository = musicRepository;

            this.provider = provider;
        }
        public DataManager(IUserRepository usersRepository, IFriendsRepository friendsRepository, IFriendRequestsRepository friendRequestsRepository,
                           IMessagesRepository messagesRepository, IPictureRepository pictureRepository, IMusicRepository musicRepository, IPostRepository postRepository,
                           ICommentRepository commentReposiyory, PrimaryMembershipProvider provider)
        {
            this.usersRepository          = usersRepository;
            this.friendsRepository        = friendsRepository;
            this.friendRequestsRepository = friendRequestsRepository;
            this.messagesRepository       = messagesRepository;
            this.pictureRepository        = pictureRepository;
            this.musicRepository          = musicRepository;

            this.provider = provider;
        }
Beispiel #21
0
        public HomeController(
            IMusicRepository musicRepository,
            IUserRepository userRepository,
            IMusicRepository_ADONET musicRepository_adonet,
            IUserRepository_ADONET userRepository_ADONET,
            MusicStoreContext efContext)
        {
            _musicRepository = musicRepository;
            _userRepository  = userRepository;

            _musicRepository_adonet = musicRepository_adonet;
            _userRepository_ADONET  = userRepository_ADONET;

            _efContext = efContext;
        }
Beispiel #22
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OwnfyWeb"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="repository">The music repository</param>
        public OwnfyWeb(string path, IMusicRepository repository) : base(path)
        {
            RequiresNotNull(path);

            this.Get["/stream/{id:int}"] = parameters =>
            {
                var stream = repository.GetSongStream((int)parameters.id);
                var res    = new FlushingStreamResponse(stream, "audio/mpeg3");

                var len = stream.Length;
                foreach (var s in this.Request.Headers["Range"])
                {
                    var start = s.Split('=')[1];
                    var m     = Regex.Match(start, @"(\d+)-(\d+)?");
                    start = m.Groups[1].Value;
                    var end = len - 1;
                    if (!string.IsNullOrWhiteSpace(m.Groups[2].Value))
                    {
                        end = Convert.ToInt64(m.Groups[2].Value);
                    }

                    var startI = Convert.ToInt64(start);
                    var length = len - startI;
                    res.WithHeader("content-range", "bytes " + start + "-" + end + "/" + len);
                    res.WithHeader("content-length", length.ToString(CultureInfo.InvariantCulture));
                    res.StatusCode = HttpStatusCode.PartialContent;
                }

                return(res);
            };

            this.Get["/artist/{artist}", true] = async(parameters, ct) =>
            {
                var artistContents = await repository.SearchSongsByArtist((string)parameters.artist, string.Empty);

                return(artistContents);
            };

            this.Get["/search/{searchText}", true] = async(parameters, ct) =>
            {
                var results = await repository.SearchSong((string)parameters.searchText);

                return(results);
            };
        }
Beispiel #23
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OwnfyWeb"/> class.
		/// </summary>
		/// <param name="path">The path.</param>
		/// <param name="repository">The music repository</param>
		public OwnfyWeb(string path, IMusicRepository repository) : base(path)
		{
			RequiresNotNull(path);

			this.Get["/stream/{id:int}"] = parameters =>
			{
				var stream = repository.GetSongStream((int)parameters.id);
				var res = new FlushingStreamResponse(stream, "audio/mpeg3");

				var len = stream.Length;
				foreach (var s in this.Request.Headers["Range"])
				{
					var start = s.Split('=')[1];
					var m = Regex.Match(start, @"(\d+)-(\d+)?");
					start = m.Groups[1].Value;
					var end = len - 1;
					if (!string.IsNullOrWhiteSpace(m.Groups[2].Value))
					{
						end = Convert.ToInt64(m.Groups[2].Value);
					}

					var startI = Convert.ToInt64(start);
					var length = len - startI;
					res.WithHeader("content-range", "bytes " + start + "-" + end + "/" + len);
					res.WithHeader("content-length", length.ToString(CultureInfo.InvariantCulture));
					res.StatusCode = HttpStatusCode.PartialContent;
				}

				return res;
			};

			this.Get["/artist/{artist}", true] = async (parameters, ct) =>
			{
				var artistContents = await repository.SearchSongsByArtist((string)parameters.artist, string.Empty);
				return artistContents;
			};

			this.Get["/search/{searchText}", true] = async (parameters, ct) =>
			{
				var results = await repository.SearchSong((string)parameters.searchText);
				return results;
			};
		}
Beispiel #24
0
        public UnitOfWork(IMusicRepository musicRepository,
                          IGenreRepository genreRepository,
                          IMusicGenreRepository musicGenreRepository,
                          IAlbumRepository albumRepository,
                          IMusicPlaylistRepository musicPlaylistRepository,
                          IUserPlaylistRepository userPlaylistRepository,

                          UserManager <User> userManager,
                          RoleManager <IdentityRole> roleManager,
                          SignInManager <User> signInManager)
        {
            _musicRepository         = musicRepository;
            _genreRepository         = genreRepository;
            _musicGenreRepository    = musicGenreRepository;
            _albumRepository         = albumRepository;
            _musicPlaylistRepository = musicPlaylistRepository;
            _userPlaylistRepository  = userPlaylistRepository;

            _userManager   = userManager;
            _roleManager   = roleManager;
            _signInManager = signInManager;
        }
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            //Initialize Repositry to use the file store.
            Repository = new FileMusicRepository();

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (e.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                {
                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter
                    rootFrame.Navigate(typeof(MainPage), e.Arguments);
                }
                // Ensure the current window is active
                Window.Current.Activate();
            }
        }
 public MockUnitOfWork InitializeMusicRepo(IMusicRepository musicRepo)
 {
     Setup(x => x.Musics).Returns(musicRepo);
     return(this);
 }
 public ViewMusicDetailController()
 {
     this.repository = new MusicRepository <MusicDetail>();
 }
 public AdminHomeController(IMusicRepository music)
 {
     musicRepo = music;
 }
 public MusicService(IMusicRepository repository)
 {
     _repository = repository;
 }
Beispiel #30
0
 public MusicController()
 {
     musicRepository = new MusicRepository(context);
 }
 public SmapiSoapControllerDependencies(IMusicRepository musicRepository, IIdentityProvider identityProvider)
 {
     Id = Guid.NewGuid();
     MusicRepository = musicRepository;
     IdentityProvider = identityProvider;
 }
Beispiel #32
0
 public ScanController(IMusicRepository mr, IOptions<MusicOptions> options, ILogger<ScanController> logger, IHostingEnvironment env) : base(env)
 {
     this.musicRepository = mr;
     this.logger = logger;
     this.Options = options.Value;
 }
Beispiel #33
0
 public MusicService(
     IMusicRepository musicRepository)
 {
     _musicRepository = musicRepository;
 }
 public GenerateDataController(IMusicRepository musicRepository,
                               IBaseRespository <ProductEntity> productRepository)
 {
     _musicRepository   = musicRepository;
     _productRepository = productRepository;
 }
 public DeletedMusicScanner(IMusicRepository musicRepository) : base(taskId)
 {
     this.musicRepository = musicRepository;
 }
 public UpdateMusicHandler(IMusicRepository musicRepository)
 {
     _musicRepository = musicRepository ?? throw new ArgumentNullException(nameof(musicRepository));
 }
 public AlbumController()
 {
     _musicRepository = new Chinook.Repository.InMemory.MusicRepository();
 }
 public TrackEditViewModel(IMusicRepository musicRepository, Track track)
 {
     Track = track;
     Genres = new SelectList(musicRepository.GetGenres(), "ID", "Name");
     Albums = new SelectList(musicRepository.GetAlbums(), "AlbumID", "Title");
 }
 public ViewMusicDetailController(IMusicRepository <MusicDetail> repository)
 {
     this.repository = repository;
 }
 public DeleteMusicBusiness(IMusicRepository musicRepository)
 {
     _musicRepository = musicRepository;
 }
Beispiel #41
0
 public AddMusicBusiness(IMusicRepository musicRepository)
 {
     _musicRepository = musicRepository;
 }
Beispiel #42
0
 public HomeController(ILogger <HomeController> logger, IMusicRepository Music, MusicDbContext context)
 {
     _logger      = logger;
     this.Music   = Music;
     this.context = context;
 }
Beispiel #43
0
 public AuthorService(IMusicRepository<Author> authorRepository)
 {
     this._authorRepository = authorRepository;
 }
 public TrackController()
 {
     _musicRepository = new Chinook.Repository.InMemory.MusicRepository();
 }
Beispiel #45
0
 public UserService(
     IUserRepository userRepository, IMusicRepository musicRepository)
 {
     _userRepository = userRepository;
     _musicRepository = musicRepository;
 }
Beispiel #46
0
 public MusicController(IMusicRepository paramrepository)
 {
     repository = paramrepository;
 }
Beispiel #47
0
 public AlbumController()
 {
     musicRepository = new MusicRepository();
 }
Beispiel #48
0
 public GenreService(IMusicRepository<Genre> genreRepository)
 {
     this._genreRepository = genreRepository;
 }