Esempio n. 1
0
 public TrainingService(ChatContext context,
                        ISessionsService sessionsService,
                        IGoalsService goals)
 {
     _context         = context;
     _sessionsService = sessionsService;
     _goalsService    = goals;
 }
Esempio n. 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();
 }
Esempio n. 3
0
 public MockTrainingService(IGoalsService goals,
                            TrainingMockConfiguration config,
                            IHubContext <TrainingHub> hubContext,
                            ILogger <MockTrainingService> logger)
 {
     _goalsService = goals;
     _config       = config;
     _hubContext   = hubContext;
     _logger       = logger;
 }
Esempio n. 4
0
 /// <summary>
 /// Конструктор
 /// </summary>
 public GoalsController(ICurrentUserService currentUserService,
                        IGoalsService goalsService,
                        IGoalAttachmentsService attachmentsService,
                        IFormFilesService formFilesService)
 {
     _currentUserService = currentUserService;
     _service            = goalsService;
     _attachmentsService = attachmentsService;
     _formFilesService   = formFilesService;
 }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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);
            }
        }
Esempio n. 8
0
 public GoalsController(ICategoriesService categoriesService,
                        IGoalsService goalsService)
 {
     _categoriesService = categoriesService;
     _goalsService      = goalsService;
 }
Esempio n. 9
0
 public GoalsController(IGoalsService goalsService) => _goalsService = goalsService;
Esempio n. 10
0
 public GoalsController(IGoalsService GoalService, IApplicationUserService applicationUserService)
 {
     _goalsService           = GoalService;
     _applicationUserService = applicationUserService;
 }
Esempio n. 11
0
 public HomeController(ICreditService creditService, IGoalsService goalsService, ISavingGoalService savingGoalService)
 {
     this.creditService     = creditService;
     this.goalsService      = goalsService;
     this.savingGoalService = savingGoalService;
 }
Esempio n. 12
0
 public GoalsController(IGoalsService goalsService)
 {
     this.goalsService = goalsService;
 }
Esempio n. 13
0
 public GoalsController(IGoalsService service, IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor)
 {
     _service = service;
 }