Exemplo n.º 1
0
        public void Setup()
        {
            var errorHandler = new ErrorHandlerService();

            _user = new UserService(errorHandler);
            _jwt  = new JwtAuthService(errorHandler);
        }
Exemplo n.º 2
0
        public void Setup()
        {
            var errorHandler = new ErrorHandlerService();

            _user        = new UserService(errorHandler);
            _jwt         = new JwtAuthService(errorHandler);
            _project     = new ProjectService(errorHandler);
            _projectType = new ProjectTypeService(errorHandler);
        }
Exemplo n.º 3
0
        public BotMain(IServiceProvider services, MessageRemoverService responseRemover, ErrorHandlerService errorHandler, Statistics statistics, IConfiguration configuration, IAudioService audioService, DiscordSocketClient client, PlayerService playerService, ConfigurationRepository configurationRepository, InactivityTrackingService inactivityTrackingService)
        {
            _configuration             = configuration;
            _responseRemover           = responseRemover;
            _errorHandler              = errorHandler;
            _statistics                = statistics;
            _serviceProvider           = services;
            _audioService              = audioService;
            _client                    = client;
            _playerService             = playerService;
            _configurationRepository   = configurationRepository;
            _inactivityTrackingService = inactivityTrackingService;

            _commands = new CommandService();
        }
Exemplo n.º 4
0
        public IHttpActionResult CallSystemAdmin(string userId, string url, string ip)
        {
            IErrorHandlerService _errorHandlerService = new ErrorHandlerService();
            LogManager           gngLogManager        = new LogManager();

            try
            {
                if (_errorHandlerService.IsErrorCounterAtMax() == true)
                {
                    var errorMessage = _errorHandlerService.ContactSystemAdmin();
                    return(Ok(errorMessage));
                }
                else
                {
                    return(Ok());
                }
            }
            catch (Exception e)
            {
                _gngLoggerService.LogBadRequest(userId, ip, url, e.ToString());
                return(BadRequest());
            }
        }
Exemplo n.º 5
0
 public ClienteController(ClienteService service, ErrorHandlerService errorHandlerService)
 {
     _service             = service;
     _errorHandlerService = errorHandlerService;
 }