Exemplo n.º 1
0
        /// <summary>
        /// Инициализирует экземпляр <see cref="AdminHandler"/>
        /// </summary>
        /// <param name="resultFileGenerator">Генератор результатов пользователей.</param>
        /// <param name="encrypter">Шифровальщик.</param>
        public AdminHandler([NotNull] IResultFileGenerator resultFileGenerator, [NotNull] IEncrypter encrypter)
        {
            _resultFileGenerator = resultFileGenerator;
            _encrypter           = encrypter;
            var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings[@"UserStatistics"].ConnectionString;

            _connection = new SqlConnection(connectionString);
            Logger      = LogManager.GetLogger(typeof(AdminHandler));
        }
Exemplo n.º 2
0
 public Solution(
     ILogger <Solution> logger,
     IStatementsProvider <ProblemStatement> statementsProvider,
     IResolver <ProblemStatement, Result> resolver,
     IResultFileGenerator <Result> resultFileGenerator
     )
 {
     _logger              = logger;
     _statementsProvider  = statementsProvider;
     _resolver            = resolver;
     _resultFileGenerator = resultFileGenerator;
 }