public UniversityController(
     IMapper mapper,
     IUniversityService universityService)
 {
     _mapper            = mapper;
     _universityService = universityService;
 }
Exemplo n.º 2
0
 private void InitializeFields()
 {
     _mockStudentExchangeDataContext = new Mock <IStudentExchangeDataContext>();
     _mockFacultyService             = new Mock <IFacultyService>();
     _universityService =
         new UniversityService(_mockStudentExchangeDataContext.Object, _mockFacultyService.Object);
 }
Exemplo n.º 3
0
 public UniversitiesController(
     IServiceResultMapper viewMapper,
     IUniversityService universityService)
 {
     _viewMapper        = viewMapper;
     _universityService = universityService;
 }
Exemplo n.º 4
0
 public ClassController()
 {
     UserInformationFactory.SetInstance(UserInformation<User, WhoIsOnline>.Instance(new HttpContextWrapper(System.Web.HttpContext.Current), new WhoIsOnlineService<User, WhoIsOnline>(new EntityWhoIsOnlineRepository()), new GetUserStrategy()));
     theValidationDictionary = new ModelStateWrapper(this.ModelState);
     theClassService = new ClassService(theValidationDictionary);
     theUniversityService = new UniversityService(theValidationDictionary);
 }
        /// Constructor to initlize class object

        public ApplicationController()
        {
            _applicationService = new ApplicationService();
            _universityService  = new UniversityService();
            _applicantService   = new ApplicantService();
            _universityHelper   = new UniversityHelper();
        }
 public UniversitiesController(IUniversityService universityService,
                               ILogger <UniversitiesController> logger,
                               IOptions <UniversityConfig> config)
 {
     _universityService = universityService;
     _logger            = logger;
     _config            = config.Value;
 }
Exemplo n.º 7
0
 public CuratorCourseWorksController(ICourseWorksService courseWorksService, IReviewService reviewService,
                                     IUniversityService universityService, IUserService userService)
 {
     _courseWorksService = courseWorksService;
     _reviewService      = reviewService;
     _universityService  = universityService;
     _userService        = userService;
 }
 public CourseWorksController(IApplicationsService applicationsService, ICourseWorksService courseWorksService,
                              IUniversityService universityService, IUserService userService)
 {
     _applicationsService = applicationsService;
     _courseWorksService  = courseWorksService;
     _universityService   = universityService;
     _userService         = userService;
 }
 public UniversityController(IUniversityService UniversityService,
                             IUniversity_MajorsService University_MajorsService,
                             IUniversity_Majors_SubjectGroupService University_Majors_SubjectGroupService)
 {
     this.UniversityService        = UniversityService;
     this.University_MajorsService = University_MajorsService;
     this.University_Majors_SubjectGroupService = University_Majors_SubjectGroupService;
 }
Exemplo n.º 10
0
 public GroupController(
     IGroupService groupService,
     IUniversityService universityService,
     ICourseService courseService)
 {
     this.groupService      = groupService;
     this.universityService = universityService;
     this.courseService     = courseService;
 }
Exemplo n.º 11
0
 public HomeController(
     ITeacherService teacherService,
     IUniversityService universityService,
     IMapper mapper)
 {
     _universityService = universityService;
     _teacherService    = teacherService;
     _mapper            = mapper;
 }
Exemplo n.º 12
0
 public MessageService(IStudentExchangeDataContext studentExchangeDataContext, IUniversityService universityService, IFacultyService facultyService, ICourseOfStudyService courseOfStudyService, IGroupService groupService, IStudentService studentService)
 {
     _studentExchangeDataContext = studentExchangeDataContext;
     _universityService          = universityService;
     _facultyService             = facultyService;
     _courseOfStudyService       = courseOfStudyService;
     _groupService   = groupService;
     _studentService = studentService;
 }
Exemplo n.º 13
0
 public TeacherController(
     IMapper mapper,
     ITeacherService teacherService,
     IUniversityService universityService)
 {
     _mapper            = mapper;
     _teacherService    = teacherService;
     _universityService = universityService;
 }
Exemplo n.º 14
0
 public StudentController(IStudentService studentService, ICityService cityService, IDepartmentService departmentService, IEducationTypeService educationTypeService, IFacultyService facultyService, IGraduateTypeService graduateTypeService, IUniversityService universityService)
 {
     _studentService       = studentService;
     _cityService          = cityService;
     _departmentService    = departmentService;
     _educationTypeService = educationTypeService;
     _facultyService       = facultyService;
     _graduateTypeService  = graduateTypeService;
     _universityService    = universityService;
 }
Exemplo n.º 15
0
 public CommentController(
     IMapper mapper,
     ICommentService commentService,
     IUniversityService universityService,
     SignInManager <User> signInManager)
 {
     _mapper            = mapper;
     _commentService    = commentService;
     _universityService = universityService;
     _signInManager     = signInManager;
 }
Exemplo n.º 16
0
        public void UniversityTest()
        {
            //executes or runs before each test method
            _mockUnitOfWork = new Mock <IUnitOfWork>();
            _mockLogger     = new Mock <ILogger <UniversityService> >();
            _mapper         = new MapperConfiguration(mc => { mc.AddProfile(new MappingProfile()); }).CreateMapper();

            _universityService = new UniversityService(_mockUnitOfWork.Object, _mapper, _mockLogger.Object);

            _mockUniversityResourceParameters = new Mock <UniversityResourceParameters>();
        }
Exemplo n.º 17
0
 public MainWindow(IUniversityService universityService)
 {
     InitializeComponent();
     service = universityService;
     Update(universityService);
     dgStudent.DataContext = Students;
     dgGroup.DataContext   = Groups;
     for (int i = 0; i < Groups.Count; i++)
     {
         cbGroup.Items.Add(Groups[i].Name);
     }
 }
Exemplo n.º 18
0
 public SharedController(
     ICountryService countryService,
     IUniversityService universityService,
     IConfiguration configuration,
     ISecurityService securityService
     )
 {
     this.countryService    = countryService;
     this.universityService = universityService;
     this.configuration     = configuration;
     this.securityService   = securityService;
 }
Exemplo n.º 19
0
 public CourseController(
     ICourseService courseService,
     IUniversityService universityService,
     ITeacherService teacherService,
     IFileStorageService fileStorageService,
     IMapper mapper)
 {
     this.courseService      = courseService;
     this.mapper             = mapper;
     this.universityService  = universityService;
     this.teacherService     = teacherService;
     this.fileStorageService = fileStorageService;
 }
Exemplo n.º 20
0
        public static async Task <bool> IsUniversityStudentOrHigherAsync(
            this ClaimsPrincipal user,
            int universityId,
            IUniversityService universityService)
        {
            if (user.IsInRole(RoleName.STUDENT))
            {
                return(await universityService.HasStudentAsync(universityId, user.Identity.Name));
            }

            bool isGreaterAccess = await user.IsUniversityTeacherOrHigherAsync(universityId, universityService);

            return(isGreaterAccess);
        }
 public MarkController(
     IMapper mapper,
     IUniversityService universityService,
     ITeacherService teacherService,
     ICourseService courseService,
     IMarkService markService,
     SignInManager <User> signInManager)
 {
     _mapper            = mapper;
     _universityService = universityService;
     _teacherService    = teacherService;
     _courseService     = courseService;
     _signInManager     = signInManager;
     _markService       = markService;
 }
Exemplo n.º 22
0
        private void Update(IUniversityService universityService)
        {
            Students.Clear();
            Groups.Clear();
            var tempStud  = universityService.GetStudents();
            var tempGroup = universityService.GetGroup();

            foreach (var item in tempStud)
            {
                Students.Add(item);
            }
            foreach (var item in tempGroup)
            {
                Groups.Add(item);
            }
        }
Exemplo n.º 23
0
        public static async Task <bool> IsUniversityAdminOrHigherAsync(
            this ClaimsPrincipal user,
            int universityId,
            IUniversityService universityService)
        {
            if (user.IsInRole(RoleName.ADMIN))
            {
                return(true);
            }

            if (user.IsInRole(RoleName.UNIVERSITY_ADMIN))
            {
                return(await universityService.HasUniversityAdminAsync(universityId, user.Identity.Name));
            }

            return(false);
        }
Exemplo n.º 24
0
        public void setUp()
        {
            obj        = new UniversitiesController(_linkGenerator, _logger, _universityService);
            id         = new Guid("1B7F86DD-FCD0-42A5-5E5F-08D7D5A16E26");
            repository = new UniversityRepository(dbContext);
            source     = new CancellationTokenSource();
            token      = source.Token;
            pagedResourceParameters = new UniversityResourceParameters();
            context       = new ActionContext();
            universityDto = new UniversityDto();

            //serviceProvider
            var serviceCollection = new ServiceCollection();

            //serviceCollection.AddSingleton<IUniversityService, UniversityService>();
            //serviceCollection.AddTransient<University>();
            serviceCollection.AddTransient <IInstitutionService, InstitutionService>();

            _serviceProvider = serviceCollection.BuildServiceProvider();
            //--------------------------------------------------------------

            uow = new UnitOfWork(dbContext, _serviceProvider);

            //logger
            var loggerFactory = LoggerFactory.Create(builder =>
            {
                builder
                .AddFilter("Microsoft", LogLevel.Warning)
                .AddFilter("System", LogLevel.Warning)
                .AddFilter("LoggingConsoleApp.University", LogLevel.Debug)
                .AddConsole()
                .AddEventLog();
            });

            logger = loggerFactory.CreateLogger <UniversityService>();
            logger.LogInformation("Example log message");
            //------------------------------------------------------------------

            _mapper           = new MapperConfiguration(mc => { mc.AddProfile(new MappingProfile()); }).CreateMapper();
            universityService = new UniversityService(uow, _mapper, logger);
        }
Exemplo n.º 25
0
 public EducationController(IUserService IUserService, IEducationService IEducationService, IClassService IClassService, ICollegeService ICollegeService, IDisciplineService IDisciplineService,
                            IEducationCategoryService IEducationCategoryService, ISpecializationService ISpecializationService, IUniversityService IUniversityService, IEducationCategoryUniversityBoardMappingService IEducationCategoryUniversityBoardMappingService)
 {
     this._IUserService      = IUserService;
     this._IEducationService = IEducationService;
     _educationDetails       = new EmployeeEducationDetail();
     this._IClassService     = IClassService;
     _class = new Master_Class();
     this._ICollegeService = ICollegeService;
     _college = new Master_College();
     this._IDisciplineService = IDisciplineService;
     _discipline = new Master_Discipline();
     this._IEducationCategoryService = IEducationCategoryService;
     _educationCategory           = new Master_EducationCategory();
     this._ISpecializationService = ISpecializationService;
     _specialization          = new Master_Specialization();
     this._IUniversityService = IUniversityService;
     _university = new Master_University();
     this._IEducationCategoryUniversityBoardMappingService = IEducationCategoryUniversityBoardMappingService;
     _educationCategoryUniversityBoardMapping = new EducationCategoryUniversityBoardMapping();
 }
Exemplo n.º 26
0
 public DeleteUniversityHandler(IUniversityService universityService) => _universityService = universityService;
Exemplo n.º 27
0
 /// <summary>
 /// Basic constructor.
 /// </summary>
 /// <param name="universityService"><see cref="IUniversityService"/> instance.</param>
 public UniversityController(IUniversityService universityService)
 {
     _universityService = universityService;
 }
Exemplo n.º 28
0
 public UniversityController(IUniversityService universityService, ILogger <UniversityController> logger)
 {
     _universityService = universityService;
     _logger            = logger;
 }
Exemplo n.º 29
0
 public UniversitiesController(IUniversityService universityService, IMapper mapper)
 {
     _universityService = universityService;
     _mapper            = mapper;
 }
Exemplo n.º 30
0
 public UserController(IAuthService authService, IUniversityService universityService, IMapper mapper)
 {
     this.authService       = authService;
     this.universityService = universityService;
     this.mapper            = mapper;
 }
Exemplo n.º 31
0
 public ApplicationController()
 {
     service    = new CourseService.Service.CourseService();
     appService = new ApplicationService();
     uniService = new UniversityService();
 }
Exemplo n.º 32
0
 public HomeController(IDbContext dbContext, IUniversityService universityService)
 {
     _dbContext = dbContext;
     _universityService = universityService;
 }
Exemplo n.º 33
0
 public UniversityController(IUniversityService universityService)
 {
     _universityService = universityService;
 }