public OrdersController(ICoreRepository repository, ILogger <ProductsController> logger, IMapper mapper, UserManager <StoreUser> userManager) { _logger = logger; _mapper = mapper; _userManager = userManager; _repository = repository; }
public SimpleAuthorizationServerProvider(ICoreRepository coreRepo, IAccountRepository accountRepo, IOauthRepository oauthRepo) : this(new ApplicationUserManager(new UserStore(accountRepo, coreRepo))) { _coreRepo = coreRepo; _accountRepo = accountRepo; _oauthRepo = oauthRepo; }
public ActivityService(DiscordSocketClient client, ICoreRepository coreContext) { _coreRepository = coreContext; client.UserJoined += UserJoinedAnnounceAsync; client.UserLeft += UserLeftAnnounceAsync; client.UserVoiceStateUpdated += UserVoiceAnnounceAsync; }
public MessageController(IMessageReceiverRepository imessage, ICoreRepository icore, IRepository res, UserManager <AppUser> userManager) { _imessage = imessage; _icore = icore; _res = res; _userManager = userManager; }
public virtual async Task ExecuteTransAsync(Func <ICoreRepository, bool> Func, Action <Exception> Rollback = null) { ICoreRepository repository = null; try { if (Func != null) { repository = await this.BeginTransAsync(); var res = Func(repository); if (res) { repository.Commit(); } else { repository.Rollback(); } } } catch (Exception ex) { repository?.Rollback(); if (Rollback != null) { Rollback(ex); } else { throw; } } }
public UserManagementController(ICoreRepository coreRepository, IGeneralHelper generalHelper, IStaffRepository staffRepository, IStudentRepository studentRepository, IUserManagementRepository userManagementRepository, ISemesterRepository semesterRepository, IAccountRepository accountRepository) : base(coreRepository, generalHelper) { _coreRepo = coreRepository; _generalHelper = generalHelper; _staffRepo = staffRepository; _userManagementRepository = userManagementRepository; _studentRepository = studentRepository; _semesterRepository = semesterRepository; UserManager = new ApplicationUserManager(new UserStore(accountRepository, coreRepository)); UserManager.UserValidator = new UserValidator <IdentityUser, int>(UserManager) { AllowOnlyAlphanumericUserNames = false }; InactiveServiceCategories = new int[] { (int)ServiceCategory.AboutArms, (int)ServiceCategory.CourseAllocation, (int)ServiceCategory.Messenger, (int)ServiceCategory.MyProfile, (int)ServiceCategory.Notifications, (int)ServiceCategory.PrivacyPolicy, (int)ServiceCategory.Reports, (int)ServiceCategory.Teach, (int)ServiceCategory.TermsOfService }; }
public UserDAL(IMapper mapper, UsersDBContext context, ICoreRepository coreRepository, IOptions <AppSettings> appSettings) { _appSettings = appSettings.Value ?? throw new ArgumentNullException(nameof(appSettings.Value)); _context = context ?? throw new ArgumentNullException(nameof(context)); _coreRepository = coreRepository ?? throw new ArgumentNullException(nameof(coreRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public static int PopulateDatabase(ICoreRepository repos, IHostingEnvironment env) { return(0); /* * if (todoRepository.List<ToDoItem>().Any()) return 0; * * todoRepository.Add(new ToDoItem * { * Title = "Get Sample Working", * Description = "Try to get the sample to build." * }); * todoRepository.Add(new ToDoItem * { * Title = "Review Solution", * Description = "Review the different projects in the solution and how they relate to one another." * }); * todoRepository.Add(new ToDoItem * { * Title = "Run and Review Tests", * Description = "Make sure all the tests run and review what they are doing." * }); * * return todoRepository.List<ToDoItem>().Count; */ }
public HRController(AppDbContext context, ICoreRepository coreRep, IRepository repos, SignInManager <AppUser> signinManager, UserManager <AppUser> userManager) { _context = context; _coreRep = coreRep; _repos = repos; _signInManager = signinManager; _userManager = userManager; }
public HomeController(UserViewModel currentUserConfig, IAccountService accountService, ICoreRepository coreRepository) : base(currentUserConfig) { _accountService = accountService; _coreRepository = coreRepository; _currentUser = currentUserConfig; }
public AccountController(ICoreRepository coreRepo, IAccountRepository accountRepo, IStudentRepository studentRepo, IUserManagementRepository userManagementRepository) : this(new ApplicationUserManager(new UserStore(accountRepo, coreRepo))) { _coreRepo = coreRepo; _accountRepo = accountRepo; _studentRepo = studentRepo; _userManagementRepository = userManagementRepository; }
public InstructorController(ICoreRepository coreRepository, IAccountRepository accountRepository, IGeneralHelper generalHelper) : base(coreRepository, generalHelper) { _coreRepo = coreRepository; _accountRepo = accountRepository; _generalHelper = generalHelper; }
public AccountController(SignInManager <AppUser> signinManager, UserManager <AppUser> userManager, RoleManager <IdentityRole> roleManager, ICoreRepository icore) { _signinManager = signinManager; _userManager = userManager; _roleManager = roleManager; _icore = icore; //_logger = logger; }
public OrderItemsController( ICoreRepository repository, ILogger <OrderItemsController> logger, IMapper mapper) { _repository = repository; _logger = logger; _mapper = mapper; }
public OrdersController(ICoreRepository repository, ILogger <OrdersController> logger, IMapper mapper, UserManager <StoreUser> userManager ) { this._repository = repository; this._logger = logger; this._mapper = mapper; this._userManager = userManager; }
public ConfigureGuildService(DiscordSocketClient client, ICoreRepository coreSettings, LoggingService loggingService) { client.GuildAvailable += RegisterGuildAsync; client.JoinedGuild += RegisterGuildAsync; client.LeftGuild += UnregisterGuildAsync; client.UserJoined += WelcomeAsync; _coreSettings = coreSettings; _loggingService = loggingService; }
public CommandHandler(IServiceProvider services, DiscordSocketClient client, CommandService commandService, ICoreRepository settings, LoggingService loggingService, ConfigModel config) { _services = services; _client = client; _commandService = commandService; _coreSettings = settings; _loggingService = loggingService; _config = config; _client.MessageReceived += CommandHandleAsync; _commandService.CommandExecuted += OnCommandExecutedAsync; }
public GfycatConversionService(ConfigModel config, LoggingService loggingService, DiscordSocketClient discordClient, ICoreRepository coreSettings) { if (string.IsNullOrWhiteSpace(config.Credentials.Gfycat.ClientId) || string.IsNullOrWhiteSpace(config.Credentials.Gfycat.Secret)) { throw new ArgumentNullException(nameof(config)); } _loggingService = loggingService; _coreSettings = coreSettings; discordClient.MessageReceived += FileUploadHandlerAsync; _gfycatClient = new GfycatClient(config.Credentials.Gfycat.ClientId, config.Credentials.Gfycat.Secret); }
public CoreService(ICoreRepository coreRepository, IEventRepository eventRepository, IMapper mapper, IEventParticipantsRepository eventParticipantsRepository, IHomelessRepository homelessRepository, IOngRepository ongRepository) { _coreRepository = coreRepository; _eventRepository = eventRepository; _mapper = mapper; _eventParticipantsRepository = eventParticipantsRepository; _homelessRepository = homelessRepository; _ongRepository = ongRepository; }
public StaffController(ICoreRepository coreRepository, IAccountRepository accountRepository, IStaffRepository staffRepository, IGeneralHelper generalHelper, IStaffCourseRepository staffCourseRepository, IStudentCourseRepository studentCourseRepository, ISemesterRepository semesterRepository, IAdminUnitRepository adminUnitRepository) : base(coreRepository, generalHelper) { _coreRepo = coreRepository; _accountRepo = accountRepository; _staffRepo = staffRepository; _generalHelper = generalHelper; _staffCourseRepo = staffCourseRepository; _studentCourseRepo = studentCourseRepository; _semesterRepository = semesterRepository; _adminUnitRepo = adminUnitRepository; }
public PhotosController(ICoreRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig) { _cloudinaryConfig = cloudinaryConfig; _mapper = mapper; _repo = repo; Account acc = new Account( _cloudinaryConfig.Value.CloudName, _cloudinaryConfig.Value.ApiKey, _cloudinaryConfig.Value.ApiSecret ); _cloudinary = new Cloudinary(acc); }
public StudentController(IAccountRepository accountRepository, ICoreRepository coreRepository, IStudentRepository studentRepository, IGeneralHelper generalHelper, ISemesterRepository semesterRepository, IAdminUnitRepository adminUnitRepository, IStaffRepository staffRepository, IStudentsHelper studentsHelper, IStudentCourseRepository studentCourseRepository) : base(coreRepository, generalHelper) { _studentRepo = studentRepository; _semesterRepo = semesterRepository; _adminUnitRepo = adminUnitRepository; _accountRepository = accountRepository; _staffRepo = staffRepository; _studentsHelper = studentsHelper; _studentCourseRepository = studentCourseRepository; UserManager = new ApplicationUserManager(new UserStore(accountRepository, coreRepository)); UserManager.UserValidator = new UserValidator <IdentityUser, int>(UserManager) { AllowOnlyAlphanumericUserNames = false }; }
public UtilsApiController(ICoreRepository coreRepository, IGeneralHelper generalHelper, IUserManagementRepository userManagementRepository, IStudentRepository studentRepository, IStudentCourseRepository studentCourseRepository, ISemesterRepository semesterRepository, IStaffRepository staffRepository, IAccountRepository accountRepository ) { _coreRepository = coreRepository; _generalHelper = generalHelper; _userManagementRepository = userManagementRepository; _studentRepository = studentRepository; _semesterRepository = semesterRepository; _studentCourseRepository = studentCourseRepository; _accountRepository = accountRepository; _staffRepository = staffRepository; UserManager = new ApplicationUserManager(new UserStore(accountRepository, coreRepository)); UserManager.UserValidator = new UserValidator <IdentityUser, int>(UserManager) { AllowOnlyAlphanumericUserNames = false }; }
public ProductsController(ICoreRepository repository, ILogger <ProductsController> logger) { _logger = logger; _repository = repository; }
public CoreService(ICoreRepository coreRepository) { _coreRepository = coreRepository; }
public MessageController(ICoreRepository repository) { this.Repository = repository; }
public SimpleRepository(ICoreRepository core) { _core = core; }
public void SetUp() { _generalHelper = new Mock <IGeneralHelper>().Object; _coreRepository = new Mock <ICoreRepository>().Object; controller = new HomeController(_coreRepository, _generalHelper); }
public UserService(ICoreRepository repository) { _repository = repository; }
public Service(ICoreRepository repo) { _repo = repo; }