public CheckpointController(ICheckpointService checkpointService, ITypeService typeService,
                             IAdmissionService admissionService)
 {
     this.checkpointService = checkpointService;
     this.typeService       = typeService;
     this.admissionService  = admissionService;
 }
 public ActivitiesController(IActivityService activityService, ICheckpointService checkpointService,
                             IIdentityService identityService)
 {
     this.activityService   = activityService;
     this.checkpointService = checkpointService;
     this.identityService   = identityService;
 }
示例#3
0
 public ActivityController(IActivityService service, IModeService modeService,
                           IIdentityService identityService, ICheckpointService checkpointService)
 {
     this.service           = service;
     this.modeService       = modeService;
     this.identityService   = identityService;
     this.checkpointService = checkpointService;
 }
		/// <summary>
		/// Constructor.
		/// </summary>
		public BaseCheckpointController(
			BaseControllerArgs args, 
			IClassroomService classroomService,
			IProjectService projectService,
			ICheckpointService checkpointService) 
				: base(args, classroomService, projectService)
		{
			CheckpointService = checkpointService;
		}
示例#5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public BaseCheckpointController(
     BaseControllerArgs args,
     IClassroomService classroomService,
     IProjectService projectService,
     ICheckpointService checkpointService)
     : base(args, classroomService, projectService)
 {
     CheckpointService = checkpointService;
 }
		/// <summary>
		/// Constructor.
		/// </summary>
		public CheckpointController(
			BaseControllerArgs args,
			IClassroomService classroomService,
			ISectionService sectionService,
			IProjectService projectService,
			ICheckpointService checkpointService)
				: base(args, classroomService, projectService)
		{
			SectionService = sectionService;
			CheckpointService = checkpointService;
		}
示例#7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public CheckpointController(
     BaseControllerArgs args,
     IClassroomService classroomService,
     ISectionService sectionService,
     IProjectService projectService,
     ICheckpointService checkpointService)
     : base(args, classroomService, projectService)
 {
     SectionService    = sectionService;
     CheckpointService = checkpointService;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public SubmissionController(
     BaseControllerArgs args,
     IClassroomService classroomService,
     IProjectService projectService,
     ICheckpointService checkpointService,
     ISubmissionService submissionService,
     IUserService userService,
     WebAppHost webAppHost)
     : base(args, classroomService, projectService, checkpointService)
 {
     SubmissionService = submissionService;
     UserService       = userService;
     _webAppHost       = webAppHost;
 }
		/// <summary>
		/// Constructor.
		/// </summary>
		public SubmissionController(
			BaseControllerArgs args,
			IClassroomService classroomService,
			IProjectService projectService,
			ICheckpointService checkpointService,
			ISubmissionService submissionService,
			IUserService userService,
			WebAppHost webAppHost,
			WebAppEmail webAppEmail)
			: base(args, classroomService, projectService, checkpointService)
		{
			SubmissionService = submissionService;
			UserService = userService;
			_webAppHost = webAppHost;
			_webAppEmail = webAppEmail;
		}
示例#10
0
		/// <summary>
		/// Constructor.
		/// </summary>
		public BuildController(
			BaseControllerArgs args,
			IClassroomService classroomService,
			ISectionService sectionService,
			IProjectService projectService,
			IBuildService buildService,
			ICheckpointService checkpointService,
			ISubmissionService submissionService,
			IJsonSerializer jsonSerializer)
				: base(args, classroomService, projectService)
		{
			SectionService = sectionService;
			BuildService = buildService;
			CheckpointService = checkpointService;
			SubmissionService = submissionService;
			_jsonSerializer = jsonSerializer;
		}
示例#11
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public BuildController(
     BaseControllerArgs args,
     IClassroomService classroomService,
     ISectionService sectionService,
     IProjectService projectService,
     IBuildService buildService,
     ICheckpointService checkpointService,
     ISubmissionService submissionService,
     IJsonSerializer jsonSerializer)
     : base(args, classroomService, projectService)
 {
     SectionService    = sectionService;
     BuildService      = buildService;
     CheckpointService = checkpointService;
     SubmissionService = submissionService;
     _jsonSerializer   = jsonSerializer;
 }
 public void Initialize()
 {
     repositoryMock = new Mock <IRepository <Checkpoint> >();
     repositoryCheckpointAdmissionMock = new Mock <IRepository <CheckpointAdmission> >();
     repositoryTypeMock       = new Mock <IRepository <Type> >();
     repositoryAdmissionMock  = new Mock <IRepository <Admission> >();
     unitWorkMoq              = new Mock <IUnitOfWork>();
     serviceMock              = new CheckpointService(unitWorkMoq.Object);
     itemsCheckpointAdmission = new List <CheckpointAdmission>()
     {
         new CheckpointAdmission
         {
             ID           = 1,
             CheckpointID = 1,
             AdmissionID  = 1
         },
         new CheckpointAdmission
         {
             ID           = 2,
             CheckpointID = 2,
             AdmissionID  = 1
         },
         new CheckpointAdmission
         {
             ID           = 3,
             CheckpointID = 2,
             AdmissionID  = 2
         },
         new CheckpointAdmission
         {
             ID           = 4,
             CheckpointID = 1,
             AdmissionID  = 2
         }
     };
     itemsAdmission = new List <Admission>()
     {
         new Admission
         {
             ID          = 1,
             Role        = "Сотрудник",
             Description = "Вход в лабораторию"
         },
         new Admission
         {
             ID          = 2,
             Role        = "Студент",
             Description = "Вход в 1-й корпус"
         }
     };
     itemsType = new List <Type>()
     {
         new Type {
             ID          = 1,
             Description = "Пропускает через ворота",
             Status      = "Пропускной"
         },
         new Type {
             ID          = 2,
             Description = "Отмечает посещаемость",
             Status      = "Лекционный"
         },
         new Type {
             ID          = 3,
             Description = "Собирает статистику",
             Status      = "Статистический"
         }
     };
     itemsDTO = new List <CheckpointDTO>()
     {
         new CheckpointDTO()
         {
             ID          = 1,
             IP          = "192.168.0.1",
             Campus      = 1,
             Row         = 4,
             Description = "На 4 этаже, 425 аудитория",
             Status      = "Отметка",
             Type        = (TypeDTO)itemsType[1],
             Admissions  = itemsAdmission
         },
         new CheckpointDTO()
         {
             ID          = 2,
             IP          = "192.168.0.15",
             Campus      = 1,
             Row         = 4,
             Description = "На 1 этаже на входе",
             Status      = "Пропуск",
             Type        = (TypeDTO)itemsType[0],
             Admissions  = itemsAdmission
         }
     };
     itemsSimple = new List <Checkpoint>()
     {
         new Checkpoint
         {
             ID          = 1,
             IP          = "192.168.0.1",
             Campus      = 1,
             Row         = 4,
             Description = "На 4 этаже, 425 аудитория",
             Status      = "Отметка",
             TypeID      = 2
         },
         new Checkpoint
         {
             ID          = 2,
             IP          = "192.168.0.15",
             Campus      = 1,
             Row         = 4,
             Description = "На 1 этаже на входе",
             Status      = "Пропуск",
             TypeID      = 1
         }
     };
 }
示例#13
0
 public CheckpointApiController(ICheckpointService checkpointService)
 {
     this._checkpointService = checkpointService;
 }
 public CheckpointsController(ICheckpointService service)
 {
     this.service = service;
 }
 public CheckpointController(ICheckpointService checkpointService, IOptions <AppSettings> appSettings)
 {
     _checkpointService = checkpointService;
     _appSettings       = appSettings.Value;
 }