public ScoreDatabase(IScoreQuota quota, IAmazonDynamoDB dynamoDbClient, IConfiguration configuration) { var tableName = configuration[EnvironmentNames.ScoreDynamoDbTableName]; if (string.IsNullOrWhiteSpace(tableName)) { throw new InvalidOperationException($"'{EnvironmentNames.ScoreDynamoDbTableName}' is not found."); } ScoreTableName = tableName; var scoreDataTableName = configuration[EnvironmentNames.ScoreLargeDataDynamoDbTableName]; if (string.IsNullOrWhiteSpace(scoreDataTableName)) { throw new InvalidOperationException($"'{EnvironmentNames.ScoreLargeDataDynamoDbTableName}' is not found."); } ScoreDataTableName = scoreDataTableName; var scoreItemRelationDataTableName = configuration[EnvironmentNames.ScoreItemRelationDynamoDbTableName]; if (string.IsNullOrWhiteSpace(scoreItemRelationDataTableName)) { throw new InvalidOperationException($"'{EnvironmentNames.ScoreItemRelationDynamoDbTableName}' is not found."); } ScoreItemRelationTableName = scoreItemRelationDataTableName; _quota = quota; _dynamoDbClient = dynamoDbClient; }
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; }
public ScoreItemLogics(IScoreQuota scoreQuota, IAmazonDynamoDB dynamoDbClient, IAmazonS3 s3Client, IConfiguration configuration) { this._scoreQuota = scoreQuota; this._dynamoDbClient = dynamoDbClient; _s3Client = s3Client; _configuration = configuration; }
public ScoreLogics(IScoreQuota scoreQuota, IAmazonDynamoDB dynamoDbClient, IAmazonS3 s3Client, IConfiguration configuration) { _scoreQuota = scoreQuota; _dynamoDbClient = dynamoDbClient; _s3Client = s3Client; _configuration = configuration; _commonLogic = new ScoreCommonLogic(); }
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; }
public ScoreItemDatabase(IScoreQuota quota, IAmazonDynamoDB dynamoDbClient, string tableName, string scoreItemRelationTableName) { if (string.IsNullOrWhiteSpace(tableName)) { throw new ArgumentException(nameof(tableName)); } if (string.IsNullOrWhiteSpace(scoreItemRelationTableName)) { throw new ArgumentException(nameof(scoreItemRelationTableName)); } TableName = tableName; ScoreItemRelationTableName = scoreItemRelationTableName; _quota = quota; _dynamoDbClient = dynamoDbClient; }
public ScoreSnapshotCreator(IAmazonDynamoDB dynamoDbClient, IAmazonS3 s3Client, IScoreQuota quota, IConfiguration configuration) { _dynamoDbClient = dynamoDbClient; _s3Client = s3Client; _quota = quota; _configuration = configuration; var tableName = configuration[EnvironmentNames.ScoreDynamoDbTableName]; if (string.IsNullOrWhiteSpace(tableName)) { throw new InvalidOperationException($"'{EnvironmentNames.ScoreDynamoDbTableName}' is not found."); } ScoreTableName = tableName; var scoreDataTableName = configuration[EnvironmentNames.ScoreLargeDataDynamoDbTableName]; if (string.IsNullOrWhiteSpace(scoreDataTableName)) { throw new InvalidOperationException( $"'{EnvironmentNames.ScoreItemRelationDynamoDbTableName}' is not found."); } ScoreDataTableName = scoreDataTableName; var scoreItemRelationTableName = configuration[EnvironmentNames.ScoreItemRelationDynamoDbTableName]; if (string.IsNullOrWhiteSpace(scoreItemRelationTableName)) { throw new InvalidOperationException( $"'{EnvironmentNames.ScoreItemRelationDynamoDbTableName}' is not found."); } ScoreItemRelationTableName = scoreItemRelationTableName; var scoreDataSnapshotS3Bucket = configuration[EnvironmentNames.ScoreDataSnapshotS3Bucket]; if (string.IsNullOrWhiteSpace(scoreDataSnapshotS3Bucket)) { throw new InvalidOperationException( $"'{EnvironmentNames.ScoreDataSnapshotS3Bucket}' is not found."); } ScoreDataSnapshotS3Bucket = scoreDataSnapshotS3Bucket; }
public ScorePageRemover(IAmazonDynamoDB dynamoDbClient, IScoreQuota scoreQuota, IConfiguration configuration) { _dynamoDbClient = dynamoDbClient; _scoreQuota = scoreQuota; _configuration = configuration; var tableName = configuration[EnvironmentNames.ScoreDynamoDbTableName]; if (string.IsNullOrWhiteSpace(tableName)) { throw new InvalidOperationException($"'{EnvironmentNames.ScoreDynamoDbTableName}' is not found."); } ScoreTableName = tableName; var scoreItemRelationTableName = configuration[EnvironmentNames.ScoreItemRelationDynamoDbTableName]; if (string.IsNullOrWhiteSpace(scoreItemRelationTableName)) { throw new InvalidOperationException( $"'{EnvironmentNames.ScoreItemRelationDynamoDbTableName}' is not found."); } ScoreItemRelationTableName = scoreItemRelationTableName; }