public AccountController(IApplicationUserManager userManager, IApplicationSignInManager signInManager, IAuthenticationManager authenticationManager, IProfileService profileService, IUserService userService, IIdentityMessageService identityMessageService, IEmailService emailService, IEmailIdentityService emailIdentityService, IDefinitionService definitionService, IBaseUserService baseuserService, IUnivercityStructureService univercity, IApplicationRoleManager roleManager, IUnitOfWork uow) { _uow = uow; _userManager = userManager; _signInManager = signInManager; _authenticationManager = authenticationManager; _profileService = profileService; _identityMessageService = identityMessageService; _userService = userService; _emailService = emailService; _emailIdentityService = emailIdentityService; _definitionService = definitionService; _baseuserService = baseuserService; _roleManager = roleManager; _univercity = univercity; }
public AdminAuthService(IHttpContextAccessor httpContextAccessor, IBaseUserService sysUserService, IBaseMenusRoleService BaseMenusRoleService, IBaseUserRoleService BaseUserRoleService, IBaseMenusService BaseMenusService, IBaseRolePermissionService BaseRolePermissionService ) { this._httpContextAccessor = httpContextAccessor; this._sysUserService = sysUserService; _BaseMenusRoleService = BaseMenusRoleService; _BaseUserRoleService = BaseUserRoleService; _BaseMenusService = BaseMenusService; _BaseRolePermissionService = BaseRolePermissionService; }
public BaseInfoUsersController(IUnitOfWork unitOfWork, //IApplicationUserManager userManager, // IApplicationRoleManager roleManager, // IUserService userService, IBaseUserService baseuserService, ILogService logService) { _unitOfWork = unitOfWork; //_userManager = userManager; //_roleManager = roleManager; //_userService = userService; _baseuserService = baseuserService; _logService = logService; }
public UserInfoController(IBaseUserService baseUserService, IAdminAuthService authenticationService) { _baseUserService = baseUserService; this._authenticationService = authenticationService; }
public AcceptingWorkflowManager(IBaseUserService service) { this.service = service; }
public BaseUnitTest() { Configuration = GetTestConfiguration(); var mockHttpContextAccessor = new Mock <IHttpContextAccessor>(); var context = new Mock <HttpContext>(); _mockClaimsPrincipal = new Mock <ClaimsPrincipal>(); const string fakeTenantId = "abcd"; context.Setup(x => x.Connection.RemoteIpAddress).Returns(IPAddress.None); context.Setup(x => x.User).Returns(_mockClaimsPrincipal.Object); context.Setup(x => x.Request.Headers["Tenant-ID"]).Returns(fakeTenantId); mockHttpContextAccessor.Setup(_ => _.HttpContext).Returns(context.Object); services = new ServiceCollection(); services.AddSingleton(Configuration); services.AddHttpContextAccessor(); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddScoped <IConfiguration>(c => Configuration); services.AddSingleton <IActionContextAccessor, ActionContextAccessor>(); services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies().Where(assembly => !assembly.FullName.StartsWith("Microsoft.VisualStudio.TraceDataCollector"))); services.AddScoped(typeof(IRepository <>), typeof(EfRepository <>)); services.AddSingleton <IServiceCache, ServiceCache>(); services.AddScoped <ISessionCache, SessionCache>(); services.AddScoped <IBaseUserService, BaseUserService>(); services.AddScoped <IUserService, UserService>(); services.AddScoped <IAuthorizationService, AuthorizationService>(); services.AddScoped <IEMailService, EMailService>(); services.AddScoped <IUserTwoFactorTokenProvider <User>, UserTwoFactorTokenProvider>(); services.AddScoped <ICourseService, CourseService>(); services.AddScoped <IGroupService, GroupService>(); services.AddScoped <IConverterService, ConverterService>(); services.AddScoped <ISheduleService, SheduleService>(); ServiceLifetime dbContextLifeTime = DbContextServiceLifetime; services.AddDbContext <DbContext, EJContext>(options => options .UseLazyLoadingProxies() .UseSqlServer(Configuration.GetConnectionString("ElectronicJournalDatabase")), ServiceLifetime.Transient); UndefinedUserId = Configuration.GetValue <int>("UndefinedUserId"); var serviceProvider = ServiceProvider = services.BuildServiceProvider(); serviceProvider.GetRequiredService <DbContext>().ChangeTracker .QueryTrackingBehavior = QueryTrackingBehavior.NoTracking; EMailService = serviceProvider.GetService <IEMailService>(); //UserRepository = serviceProvider.get<IRepository<User>>(); BaseUserService = serviceProvider.GetService <IBaseUserService>(); UserService = serviceProvider.GetService <IUserService>(); GroupService = serviceProvider.GetService <IGroupService>(); CourseService = serviceProvider.GetService <ICourseService>(); GroupService1 = serviceProvider.GetService <IGroupService>(); CourseService1 = serviceProvider.GetService <ICourseService>(); GroupService2 = serviceProvider.GetService <IGroupService>(); CourseService2 = serviceProvider.GetService <ICourseService>(); ConverterService = serviceProvider.GetService <IConverterService>(); Mapper = serviceProvider.GetService <IMapper>(); AbsenceRepository = serviceProvider.GetService <IRepository <Absence> >(); AbsenceNotificationRepository = serviceProvider.GetService <IRepository <AbsenceNotification> >(); AuditoriumRepository = serviceProvider.GetService <IRepository <Auditorium> >(); CalendarRepository = serviceProvider.GetService <IRepository <Calendar> >(); CalendarSheduleTimeSpendingRepository = serviceProvider.GetService <IRepository <CalendarSheduleTimeSpending> >(); TimeSpendingRepository = serviceProvider.GetService <IRepository <TimeSpending> >(); GroupRepository = serviceProvider.GetService <IRepository <Group> >(); GroupSheduleRepository = serviceProvider.GetService <IRepository <GroupShedule> >(); SemesterRepository = serviceProvider.GetService <IRepository <Semester> >(); SheduleSubjectRepository = serviceProvider.GetService <IRepository <SheduleSubject> >(); SheduleTimeSpendingRepository = serviceProvider.GetService <IRepository <SheduleTimeSpending> >(); SubjectRepository = serviceProvider.GetService <IRepository <Subject> >(); WeekDayRepository = serviceProvider.GetService <IRepository <WeekDay> >(); }