Exemplo n.º 1
0
 public S3SearchStorage(
     IConfiguration configuration,
     S3Configuration opts
     )
 {
     _credentials = opts.Credentials;
     _region      = opts.Region;
     BucketName   = opts.BucketName;
 }
Exemplo n.º 2
0
        public S3Storage(
            IConfiguration configuration,
            S3Configuration opts,
            IEnumerable <IPatternMatcher> patternMatchers,
            IEnumerable <S3MatchStrategy> strategies
            )
        {
            _credentials = opts.Credentials;
            _region      = opts.Region;
            BucketName   = opts.BucketName;
            var stratName = configuration.GetSection("AWS").GetSection("MatchStrategy").Value;

            stratName      = string.IsNullOrWhiteSpace(stratName) ? "Hierarchical" : stratName;
            MatchStrategy  = strategies.GetFor <S3MatchStrategy, S3Object>(stratName);
            PatternMatcher = patternMatchers.GetFor(stratName);
        }