Example #1
0
        public CommentService(IUnitOfWork <RutrackerContext> unitOfWork, IDateService dateService) : base(unitOfWork)
        {
            _dateService = dateService;

            _torrentRepository = _unitOfWork.GetRepository <ITorrentRepository>();
            _commentRepository = _unitOfWork.GetRepository <ICommentRepository>();
            _likeRepository    = _unitOfWork.GetRepository <ILikeRepository>();
        }
Example #2
0
        public HomeController()
        {
            DbContextOptionsBuilder <DbContext> optionsBuilder = new DbContextOptionsBuilder <DbContext>();

            optionsBuilder.UseSqlServer(@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=TorrentCheckLocalDB;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False");
            torrentRepository = new TorrentRepository(new TorrentContext(optionsBuilder.Options));
            logic             = new HomeLogic(torrentRepository);
        }
Example #3
0
        public TorrentService(
            IUnitOfWork <RutrackerContext> unitOfWork,
            IDateService dateService,
            IStorageService storageService) : base(unitOfWork)
        {
            _dateService    = dateService;
            _storageService = storageService;

            _torrentRepository     = _unitOfWork.GetRepository <ITorrentRepository>();
            _subcategoryRepository = _unitOfWork.GetRepository <ISubcategoryRepository>();
        }
Example #4
0
        public FileService(
            IUnitOfWork <RutrackerContext> unitOfWork,
            IStorageService storageService,
            IOptions <FileOptions> fileOptions) : base(unitOfWork)
        {
            _storageService = storageService;

            _fileOptions = fileOptions.Value;

            _fileRepository    = _unitOfWork.GetRepository <IFileRepository>();
            _torrentRepository = _unitOfWork.GetRepository <ITorrentRepository>();
        }
Example #5
0
        private void InitializeModel()
        {
            this.InitializeCommands();

            this.LoadSettingsModel();

            this._repository = this.Container.Resolve <ITorrentRepository>(new ParameterOverride("filepath", this.SettingsModel.RepositoryFile));
            this._eventLog   = this.Container.Resolve <IEventLog>(new ParameterOverride("filepath", this.SettingsModel.LogFile));

            this.LoadModel();
            this.SetupTimer();
            this.SetupBackgroundWorker();
        }
Example #6
0
 public MovieService(
     IActorRepository actorRepository,
     IGenreRepository genreRepository,
     IMovieRepository movieRepository,
     ITorrentRepository torrentRepository,
     IMapper mapper)
 {
     _actorRepository   = actorRepository;
     _genreRepository   = genreRepository;
     _movieRepository   = movieRepository;
     _torrentRepository = torrentRepository;
     _mapper            = mapper;
 }
        private void InitializeModel()
        {
            this.InitializeCommands();

            this.LoadSettingsModel();

            this._repository = this.Container.Resolve<ITorrentRepository>(new ParameterOverride("filepath", this.SettingsModel.RepositoryFile));
            this._eventLog = this.Container.Resolve<IEventLog>(new ParameterOverride("filepath", this.SettingsModel.LogFile));

            this.LoadModel();
            this.SetupTimer();
            this.SetupBackgroundWorker();
        }
 public TorrentsController(ITorrentRepository torrentRepository)
 {
     this.TorrentRepository = torrentRepository;
 }
Example #9
0
        public TorrentRepositoryTests()
        {
            var context = MockInitializer.GetRutrackerContext();

            _torrentRepository = new TorrentRepository(context);
        }
Example #10
0
 public HomeLogic(ITorrentRepository repository)
 {
     this.repository = repository;
     logicHTTP       = new HomeLogicHTTP();
     logicSQL        = new HomeLogicSQL();
 }