public PackageNamingConflictValidator(
     IEntityRepository<PackageRegistration> packageRegistrationRepository,
     IEntityRepository<Package> packageRepository)
 {
     _packageRegistrationRepository = packageRegistrationRepository;
     _packageRepository = packageRepository;
 }
 public MembershipService(IEntityRepository<User> userRepository, IEntityRepository<Role> roleRepository, IEntityRepository<UserInRole> userInRoleRepository, ICryptoService cryptoService)
 {
     _userRepository = userRepository;
     _roleRepository = roleRepository;
     _userInRoleRepository = userInRoleRepository;
     _cryptoService = cryptoService;
 }
示例#3
0
 public CourseController(Lazy<UserManager<ApplicationUser>> userManager, IEntityRepository entityRepository, ICourseService courseService, Lazy<ICertificateService> certificateService)
     : base(userManager)
 {
     _entityRepository = entityRepository;
     _courseService = courseService;
     _certificateService = certificateService;
 }
 public TransactionHistoryHandler(
     ITransactionHistoryFactory transactionHistoryFactory,
     IEntityRepository<IEndowmentEntity> entityRepository)
 {
     _transactionHistoryFactory = transactionHistoryFactory;
     _entityRepository = entityRepository;
 }
 public void ReviewControllerTestInit()
 {
     _reviewRepository = Substitute.For<IEntityRepository<Review>>();
     _restaurantRepository = Substitute.For<IEntityRepository<Restaurant>>();
     _httpContextService = Substitute.For<IHttpContextService>();
     _reviewController = new ReviewController(_reviewRepository, _restaurantRepository, _httpContextService);
 }
 public ModeratorLevelRepository(
     IEntityRepository<IEndowmentEntity> entityRepository,
     IGuidManager guidManager)
 {
     _entityRepository = entityRepository;
     _guidManager = guidManager;
 }
示例#7
0
 /// <summary>Initializes a new instance of the <see cref="ForumService" /> class.</summary>
 /// <param name="forumRepository">The forum repository.</param>
 /// <param name="topicRepository">The topic repository.</param>
 /// <param name="postRepository">The post repository.</param>
 public ForumService(IEntityRepository<Forum, int> forumRepository, 
     IEntityRepository<Topic, int> topicRepository, IEntityRepository<Post, int> postRepository)
 {
     this.forumRepository = forumRepository;
     this.topicRepository = topicRepository;
     this.postRepository = postRepository;
 }
 public AccountEntityOperationLogic(INotificationService notificationService, ITemplateService templateService, IEntityRepository repository, ISecurityService securityService)
 {
     _notificationService = notificationService;
     _templateService = templateService;
     _repository = repository;
     _securityService = securityService;
 }
  public EntityListPageViewModel(IEntityRepository entityRepository, INavigationService navService, IEventAggregator eventAggregator) {
      _entityRepository = entityRepository;
      _navService = navService;
      _eventAggregator = eventAggregator;
      NavCommand = new DelegateCommand<Entity>(OnNavCommand);
      EntityDetailNavCommand = new DelegateCommand(() => _navService.Navigate("EntityDetail", 0));
 }
 public TestableV1Feed(
     IEntityRepository<Package> repo,
     IGalleryConfigurationService configuration,
     ISearchService searchService)
     : base(repo, configuration, searchService)
 {
 }
 public JsonApiController(IPackageService packageSvc, IUserService userSvc, IEntityRepository<PackageOwnerRequest> packageOwnerRequestRepository, IMessageService messageService)
 {
     this.packageSvc = packageSvc;
     this.userSvc = userSvc;
     this.packageOwnerRequestRepository = packageOwnerRequestRepository;
     this.messageSvc = messageService;
 }
        public void AdminControllerTestInit()
        {
            RestaurantRepository = Substitute.For<IEntityRepository<Restaurant>>();
            ReviewRepository = Substitute.For<IEntityRepository<Review>>();

            RestaurantController = new RestaurantController(RestaurantRepository);
        }
示例#13
0
 public ManageCourseController(ICourseService courseService, IEntityRepository entityRepository, IEmailGenerationService emailGenerationService, IMailService mailService)
 {
     _courseService = courseService;
     _entityRepository = entityRepository;
     _emailGenerationService = emailGenerationService;
     _mailService = mailService;
 }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PostController" /> class.
 /// </summary>
 /// <param name="postRepository">The post repository.</param>
 /// <param name="topicRepository">The topic repository.</param>
 /// <param name="userRepository">The user repository.</param>
 public PostController(IEntityRepository<Post, int> postRepository, 
     IEntityRepository<Topic, int> topicRepository, IEntityRepository<User, int> userRepository)
 {
     this.postRepository = postRepository;
     this.topicRepository = topicRepository;
     this.userRepository = userRepository;
 }
示例#15
0
 public PackageSource(
     IEntityRepository<Package> packageRepo,
     IEntityRepository<CuratedPackage> curatedPackageRepo)
 {
     _packageSet = packageRepo;
     _curatedPackageRepository = curatedPackageRepo;
 }
示例#16
0
 public UserService(
     IAppConfiguration config,
     IEntityRepository<User> userRepository) : this()
 {
     Config = config;
     UserRepository = userRepository;
 }
示例#17
0
 public ProjectService(
     IEntityRepository<ProjectRegistration> packageRegistrationRepository,
     IEntityRepository<Project> packageRepository)
 {
     _packageRegistrationRepository = packageRegistrationRepository;
     _packageRepository = packageRepository;
 }
 public CuratedFeedService(
     IEntityRepository<CuratedFeed> curatedFeedRepository,
     IEntityRepository<CuratedPackage> curatedPackageRepository)
 {
     CuratedFeedRepository = curatedFeedRepository;
     CuratedPackageRepository = curatedPackageRepository;
 }
示例#19
0
 public PackageService(
     ICryptographyService cryptoSvc,
     IEntityRepository<PackageRegistration> packageRegistrationRepo,
     IEntityRepository<Package> packageRepo,
     IEntityRepository<PackageStatistics> packageStatsRepo,
     IPackageFileService packageFileSvc,
     IEntityRepository<PackageOwnerRequest> packageOwnerRequestRepository,
     IIndexingService indexingSvc,
     IEntityRepository<PackageAuthor> packageAuthorRepo,
     IEntityRepository<PackageFramework> packageFrameworksRepo,
     IEntityRepository<PackageDependency> packageDependenciesRepo,
     IEntityRepository<PackageFile> packageFilesRepo,
     IMessageService messageSvc)
 {
     this.cryptoSvc = cryptoSvc;
     this.packageRegistrationRepo = packageRegistrationRepo;
     this.packageRepo = packageRepo;
     this.packageStatsRepo = packageStatsRepo;
     this.packageFileSvc = packageFileSvc;
     this.packageOwnerRequestRepository = packageOwnerRequestRepository;
     this.indexingSvc = indexingSvc;
     this.packageAuthorRepo = packageAuthorRepo;
     this.packageFrameworksRepo = packageFrameworksRepo;
     this.packageDependenciesRepo = packageDependenciesRepo;
     this.packageFilesRepo = packageFilesRepo;
     this.messageSvc = messageSvc;
 }
示例#20
0
        public void test_initialize()
        {
            _fixture = new Fixture();
            _fixture.Customizations.Add(new VirtualMembersOmitter());

            _userRepository = Substitute.For<IEntityRepository<ApplicationUser>>();
            _accountService = new UserUserAccountService(_userRepository);
        }
 public MasterRepository(
     IEntityRepository entityRepo,
     IVersionControlRepository vcRepo, 
     IIssueRepository issueRepo)
 {
     this.entityRepo = entityRepo;
     builder = new RevisionSetBuilder(vcRepo, issueRepo);
 }
示例#22
0
 public AlbumService(
     IEntityRepository<Album> albumRepository,
     IValidationProvider validationProvider
     )
 {
     _albumRepository = albumRepository;
     _validationProvider = validationProvider;
 }
示例#23
0
 public UpdateConnection(IEntityRepository<Connection> the_connected_user_repository,
                             FindOrCreateGeoLocation the_find_or_create_geolocation,
                             IUnitOfWork the_unit_of_work)
 {
     connected_user_repository = Guard.IsNotNull(the_connected_user_repository, "the_connected_user_repository");
     unit_of_work = Guard.IsNotNull(the_unit_of_work, "the_unit_of_work");
     find_or_create_geolocation = Guard.IsNotNull(the_find_or_create_geolocation, "the_find_or_create_geolocation");
 }
示例#24
0
 public ReviewController(IEntityRepository<Review> reviewRepository,
                         IEntityRepository<Restaurant> restaurantRepository,
                         IHttpContextService httpContextService)
 {
     _reviewRepository = reviewRepository;
     _restaurantRepository = restaurantRepository;
     _httpContextService = httpContextService;
 }
示例#25
0
 public EntityOperationService(IEntityRepository repository, IDatabaseService dbService, IEnumerable<IEntityOperationInspector> inspectors, IEnumerable<IEntityQueryInspector> queryInspectors, IEnumerable<IEntityOperationLogic> logics)
 {
     _repository = repository;
     _dbService = dbService;
     _inspectors = inspectors ?? new IEntityOperationInspector[0];
     _queryInspectors = queryInspectors ?? new IEntityQueryInspector[0];
     _logics = logics ?? new IEntityOperationLogic[0];
 }
示例#26
0
 /// <summary>
 /// Default constructor (no DI yet).
 /// </summary>
 public PetitionController()
 {
     this.petitionRepository = new PetitionRepository();
     this.petitionVoteRepository = new PetitionVoteRepository();
     this.petitionLevelRepository = new PetitionLevelRepository();
     this.entityRepository = new EntityRepository();
     this.regionRepository = new RegionRepository();
 }
示例#27
0
 public ManagementController(Lazy<UserManager<ApplicationUser>> userManager, IEntityRepository entityRepository, Lazy<ICourseService> courseService, Lazy<IUploadService> uploadService)
     : base(userManager)
 {
     _userManager = userManager;
     _entityRepository = entityRepository;
     _courseService = courseService;
     _uploadService = uploadService;
 }
示例#28
0
        internal EntityController(IEntityRepository repository, IEntityFactory factory)
        {
            _entityRepository = repository;
            _entityFactory = factory;

            // TODO: somehow make this automatic (base constructor of controllers didn't work out)
            Initialize();
        }
 /// <summary>
 /// DI
 /// </summary>
 /// <param name="entityRepository"></param>
 /// <param name="complianceRoleFactory"></param>
 /// <param name="complianceRoleRepository"></param>
 public ComplianceRoleHandler(
     IEntityRepository<IEndowmentEntity> entityRepository,
     IComplianceRoleFactory complianceRoleFactory,
     IComplianceRoleRepository complianceRoleRepository)
 {
     _entityRepository = entityRepository;
     _complianceRoleFactory = complianceRoleFactory;
     _complianceRoleRepository = complianceRoleRepository;
 }
        public EntityController(IEntityRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.EntityRepository = repository;
        }
示例#31
0
 public V1Feed(IEntitiesContext entities, IEntityRepository <Package> repo, ConfigurationService configuration, ISearchService searchService)
     : base(entities, repo, configuration, searchService)
 {
 }
示例#32
0
        public GenreServiceBuilder WithFakeGenreRepository(IEntityRepository <Genre> genreRepository)
        {
            _genreRepository = genreRepository;

            return(this);
        }
示例#33
0
 public UserCreatedEventHandler(IEntityRepository <int> repository, ILogger <UserCreatedEventHandler> logger)
 {
     this.repository = repository;
     this.logger     = logger;
 }
示例#34
0
 public ValidationRuleRepository(IEntityRepository <ILKGEntity> entityRepository)
 {
     this.entityRepository = entityRepository;
 }
示例#35
0
 public ArticleRepository(DomainContext dbContext, IEntityRepository entityRepo)
 {
     _dbContext  = dbContext;
     _entityRepo = entityRepo;
 }
示例#36
0
 public GoodsCategoryController(IEntityRepository <SK_WM_GoodsCategory> repository)
 {
     _BoRepository = repository;
 }
 public ContentTypeService(IScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IContentService contentService,
                           IContentTypeRepository repository, IAuditRepository auditRepository, IDocumentTypeContainerRepository entityContainerRepository, IEntityRepository entityRepository,
                           IEventAggregator eventAggregator)
     : base(provider, loggerFactory, eventMessagesFactory, repository, auditRepository, entityContainerRepository, entityRepository, eventAggregator)
 {
     ContentService = contentService;
 }
 public static IQueryable <Shipment> GetNotDeliveredShipments(
     this IEntityRepository <Shipment> shipmentRepository, Guid affiliateKey) => shipmentRepository.GetNotDeliveredShipments()
 .Where(x => x.AffiliateKey == affiliateKey);
 public static IQueryable <Shipment> GetShipmentsByAffiliateKey(
     this IEntityRepository <Shipment> shipmentRepository, Guid affiliateKey) => shipmentRepository.AllIncluding(x => x.ShipmentType, x => x.ShipmentStates).Where(x => x.AffiliateKey == affiliateKey);
示例#40
0
 public RegisterSupplierHandler(IEntityRepository repository, IEventTransmitter eventTransmitter)
 {
     _repository       = repository;
     _eventTransmitter = eventTransmitter;
 }
示例#41
0
 public UpdateEntityCommandHandler(IEntityRepository repository)
 {
     _repository = repository;
 }
示例#42
0
 public DeleteUserCommandHandler(IUnitOfWork work)
 {
     _work       = work ?? throw new ArgumentNullException(nameof(work));
     _repository = work.EntityRepository;
 }
示例#43
0
 public HomeController(IEntityRepository <ch_submission> chSubmissions)
 {
     _chSubmissions = chSubmissions;
 }
示例#44
0
        public static async Task <ApplicationUser> FindUser(this IEntityRepository <ApplicationUser> identityRepository, UserManager <ApplicationUser> userManager, string email)
        {
            ApplicationUser user = await userManager.FindByEmailAsync(email);

            return(user);
        }
 public CustomersController()
 {
     custRepo = new CustomerRepository();
 }
示例#46
0
 public CategoriesQueries(IEntityRepository repository, ICurrentSession currentSession)
 {
     _repository     = repository;
     _currentSession = currentSession;
 }
示例#47
0
 public DeleteTaskHandler(IEntityRepository <Task> taskRepository,
                          IUnitOfWork unitOfWork)
 {
     _taskRepository = taskRepository;
     _unitOfWork     = unitOfWork;
 }
 public EntityService(IEntityRepository <TEntity> repository)
 {
     _repository = repository;
 }
示例#49
0
 public AllowArticleHandler(IEntityRepository repository, IEventTransmitter eventTransmitter)
 {
     _repository = repository;
     _eventTransmitter = eventTransmitter;
 }
示例#50
0
 public WarningService(IWarningRepository warningRepository, IEntityRepository entityRepository, ICongressmenRepository congressmenRepository)
 {
     this.warningRepository     = warningRepository;
     this.entityRepository      = entityRepository;
     this.congressmenRepository = congressmenRepository;
 }
示例#51
0
 protected EntityController(IEntityRepository <TEntity> repository,
                            IViewEntityModelMapper <TEntity, TViewModel> viewEntityModelMapper,
                            IEditEntityModelMapper <TEntity, TEditModel> editEntityModelMapper)
     : this(repository, viewEntityModelMapper, editEntityModelMapper, null)
 {
 }
示例#52
0
 public GeographicService(IEntityRepository repository)
 {
     _repository = repository;
 }
示例#53
0
 public HomeEndpoint(IEntityRepository repository, IUrlRegistry urls)
 {
     _repository = repository;
     _urls       = urls;
 }
示例#54
0
        public PackageService(
            IEntityRepository <PackageRegistration> packageRegistrationRepository,
            IEntityRepository <Package> packageRepository,
            IEntityRepository <PackageOwnerRequest> packageOwnerRequestRepository,
            IEntitiesContext entitiesContext,
            IAppConfiguration configuration,
            IDiagnosticsService diagnostics,
            IIndexingService indexingService,
            IPackageNamingConflictValidator packageNamingConflictValidator,
            IAuditingService auditingService)
        {
            if (packageRegistrationRepository == null)
            {
                throw new ArgumentNullException(nameof(packageRegistrationRepository));
            }

            if (packageRepository == null)
            {
                throw new ArgumentNullException(nameof(packageRepository));
            }

            if (packageOwnerRequestRepository == null)
            {
                throw new ArgumentNullException(nameof(packageOwnerRequestRepository));
            }

            if (entitiesContext == null)
            {
                throw new ArgumentNullException(nameof(entitiesContext));
            }

            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (indexingService == null)
            {
                throw new ArgumentNullException(nameof(indexingService));
            }

            if (packageNamingConflictValidator == null)
            {
                throw new ArgumentNullException(nameof(packageNamingConflictValidator));
            }

            if (auditingService == null)
            {
                throw new ArgumentNullException(nameof(auditingService));
            }

            _packageRegistrationRepository = packageRegistrationRepository;
            _packageRepository             = packageRepository;
            _packageOwnerRequestRepository = packageOwnerRequestRepository;
            _entitiesContext = entitiesContext;
            _configuration   = configuration;
            _indexingService = indexingService;
            _packageNamingConflictValidator = packageNamingConflictValidator;
            _auditingService = auditingService;

            _trace = diagnostics.SafeGetSource("PackageService");
        }
示例#55
0
 public TomViewModel(IEntityRepository tom)
 {
     myTom = tom;
 }
示例#56
0
 public GetFileHandler(IEntityRepository <File> fileRepository,
                       IMapper mapper)
 {
     _fileRepository = fileRepository;
     _mapper         = mapper;
 }
 public SymbolEntityService(ICoreSymbolPackageService galleryEntityService, IEntityRepository <SymbolPackage> symbolsPackageRepository)
 {
     _galleryEntityService     = galleryEntityService ?? throw new ArgumentNullException(nameof(galleryEntityService));
     _symbolsPackageRepository = symbolsPackageRepository ?? throw new ArgumentNullException(nameof(symbolsPackageRepository));
 }
 public CustomersController(IEntityRepository <Customer, string> customerRepository)
 {
     this.custRepo = customerRepository;
 }
示例#59
0
 public AdminAlbumTest(ITestOutputHelper output)
 {
     _output     = output;
     _context    = new MusicDbContext();
     _repository = new EntityRepository <Album>(_context);
 }
示例#60
0
 public static IQueryable <ApplicationUser> GetUsers(this IEntityRepository <ApplicationUser> identityRepository, UserManager <ApplicationUser> userManager)
 {
     return(userManager.Users);
 }