public TrainingService(ChatContext context,
                        ISessionsService sessionsService,
                        IGoalsService goals)
 {
     _context         = context;
     _sessionsService = sessionsService;
     _goalsService    = goals;
 }
Exemple #2
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="dataContext"></param>
 /// <param name="goalsService"></param>
 /// <param name="entityStateQueue"></param>
 public ProjectsService(DataContext dataContext,
                        IGoalsService goalsService,
                        IBackgroundTaskQueue <VmEntityStateMessage> entityStateQueue)
 {
     _dataContext      = dataContext;
     _goalsService     = goalsService;
     _entityStateQueue = entityStateQueue;
     _vmConverter      = new VmProjectConverter();
 }
Exemple #3
0
 public MockTrainingService(IGoalsService goals,
                            TrainingMockConfiguration config,
                            IHubContext <TrainingHub> hubContext,
                            ILogger <MockTrainingService> logger)
 {
     _goalsService = goals;
     _config       = config;
     _hubContext   = hubContext;
     _logger       = logger;
 }
Exemple #4
0
 /// <summary>
 /// Конструктор
 /// </summary>
 public GoalsController(ICurrentUserService currentUserService,
                        IGoalsService goalsService,
                        IGoalAttachmentsService attachmentsService,
                        IFormFilesService formFilesService)
 {
     _currentUserService = currentUserService;
     _service            = goalsService;
     _attachmentsService = attachmentsService;
     _formFilesService   = formFilesService;
 }
Exemple #5
0
        public MarleyService(ISessionsService sessionsService,
                             UserManager <User> userManager,
                             INlpService nlpService,
                             ITrainingService trainingService,
                             IGuideService guideService,
                             IGoalsService goalService)
        {
            _sessions     = sessionsService;
            _userManager  = userManager;
            _nlpService   = nlpService;
            _trainings    = trainingService;
            _guideService = guideService;
            _goalService  = goalService;

            Init();
        }
Exemple #6
0
        public async Task <bool> IsWithinParentDatesAsync(IGoalsService goalsService)
        {
            var goal = await goalsService.GetGoalAsync(this.Id);

            if (goal.ParentId == null)
            {
                return(true);
            }

            var startDateValid =
                this.StartDate == null ||
                (this.StartDate >= goal.Parent.StartDate);
            var endDateValid =
                this.EndDate == null ||
                (this.EndDate <= goal.Parent.EndDate);

            return(startDateValid && endDateValid);
        }
Exemple #7
0
        public async Task <bool> IsValidReorderAsync(IGoalsService goalsService)
        {
            if (this.GoalId == this.TargetParentId)
            {
                return(false);
            }

            try
            {
                var goal = await goalsService.GetGoalAsync(this.GoalId);

                var targetParent = await goalsService.GetGoalAsync(this.TargetParentId);

                var childrenIds          = goal.GetTree().Select(g => g.Id);
                var targetParentIsAChild = childrenIds.Any(c => c == this.TargetParentId);

                return(!targetParentIsAChild);
            }
            catch (GoalNotFoundException)
            {
                return(false);
            }
        }
Exemple #8
0
 public GoalsController(ICategoriesService categoriesService,
                        IGoalsService goalsService)
 {
     _categoriesService = categoriesService;
     _goalsService      = goalsService;
 }
Exemple #9
0
 public GoalsController(IGoalsService goalsService) => _goalsService = goalsService;
Exemple #10
0
 public GoalsController(IGoalsService GoalService, IApplicationUserService applicationUserService)
 {
     _goalsService           = GoalService;
     _applicationUserService = applicationUserService;
 }
 public HomeController(ICreditService creditService, IGoalsService goalsService, ISavingGoalService savingGoalService)
 {
     this.creditService     = creditService;
     this.goalsService      = goalsService;
     this.savingGoalService = savingGoalService;
 }
Exemple #12
0
 public GoalsController(IGoalsService goalsService)
 {
     this.goalsService = goalsService;
 }
Exemple #13
0
 public GoalsController(IGoalsService service, IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor)
 {
     _service = service;
 }