コード例 #1
0
        public ScoreDeleter(IAmazonDynamoDB dynamoDbClient, IAmazonS3 s3Client, IScoreQuota scoreQuota, IConfiguration configuration, IScoreCommonLogic commonLogic)
        {
            _dynamoDbClient = dynamoDbClient;
            _s3Client       = s3Client;
            _scoreQuota     = scoreQuota;
            _configuration  = configuration;
            _commonLogic    = commonLogic;


            var tableName = configuration[EnvironmentNames.ScoreDynamoDbTableName];

            if (string.IsNullOrWhiteSpace(tableName))
            {
                throw new InvalidOperationException($"'{EnvironmentNames.ScoreDynamoDbTableName}' is not found.");
            }
            ScoreTableName = tableName;


            var scoreItemS3Bucket = configuration[EnvironmentNames.ScoreItemS3Bucket];

            if (string.IsNullOrWhiteSpace(scoreItemS3Bucket))
            {
                throw new InvalidOperationException(
                          $"'{EnvironmentNames.ScoreItemS3Bucket}' is not found.");
            }
            ScoreItemS3Bucket = scoreItemS3Bucket;
        }
コード例 #2
0
ファイル: ScoreLogics.cs プロジェクト: ura-kata/score-history
 public ScoreLogics(IScoreQuota scoreQuota, IAmazonDynamoDB dynamoDbClient, IAmazonS3 s3Client, IConfiguration configuration)
 {
     _scoreQuota     = scoreQuota;
     _dynamoDbClient = dynamoDbClient;
     _s3Client       = s3Client;
     _configuration  = configuration;
     _commonLogic    = new ScoreCommonLogic();
 }
コード例 #3
0
        public ScoreCreator(IAmazonDynamoDB dynamoDbClient, IScoreQuota quota, IConfiguration configuration, IScoreCommonLogic commonLogic)
        {
            _dynamoDbClient = dynamoDbClient;
            _quota          = quota;
            _configuration  = configuration;
            _commonLogic    = commonLogic;

            var tableName = configuration[EnvironmentNames.ScoreDynamoDbTableName];

            if (string.IsNullOrWhiteSpace(tableName))
            {
                throw new InvalidOperationException($"'{EnvironmentNames.ScoreDynamoDbTableName}' is not found.");
            }
            ScoreTableName = tableName;
        }