Пример #1
0
        public AuthenticateController(IErrorService errorService, IApiHelper apiHealper, IAuthService authSrvice, ILogger <AuthenticateController> logger)
        {
            _authSrvice   = authSrvice;
            _apiHealper   = apiHealper;
            _errorService = errorService;
            _logger       = logger;

            _errRetrunFactory    = new ErrorObjectReturnFactory();
            _tokensReturnFactory = new TokensReturnFactory();
            _boolResultFactory   = new BoolResultFactory();
        }
Пример #2
0
        public ArticleController(
            IJWTService jwtService, IApiHelper apiHealper, IArticleService articleService,
            IErrorService errorService, IErrorContainer errorContainer, ILogger <ArticleController> logger)
        {
            //_articleRepository = articleRepository;
            _jwtService     = jwtService;
            _apiHealper     = apiHealper;
            _articleService = articleService;
            _errorService   = errorService;
            _errorContainer = errorContainer;
            _logger         = logger;
            //_webHostEnvironment = webHostEnvironment;

            _errRetrunFactory          = new ErrorObjectReturnFactory();
            _articleShortReturnFactory = new ArticleShortReturnFactory();
            _articleReturnFactory      = new ArticleReturnFactory();
            _boolResultFactory         = new BoolResultFactory();
        }
Пример #3
0
        public async Task <bool> NotifyFromErrorService()
        {
            if (_planitHub == null)
            {
                return(false);
            }

            if (!_errorService.HasError())
            {
                return(false);
            }


            var erF = new ErrorObjectReturnFactory();
            await _planitHub.Clients.Caller.SendAsync(Consts.PlanitPokerHubEndpoints.NotifyFromServer,
                                                      erF.GetObjectReturn(_errorService.GetErrorsObject()));

            await InvokeHubFrontMethodByErrorContainer();

            return(true);
        }