Example #1
0
        public static void AddAws(this IServiceCollection services, IConfiguration configuration)
        {
            var options = new AwsOptions();
            var section = configuration.GetSection("aws");

            section.Bind(options);
            services.Configure <AwsOptions>(configuration.GetSection("aws"));
            services.AddSingleton <IAwsService, AwsService>();
        }
 public AwsService(IOptions <AwsOptions> options)
 {
     _options = options.Value;
 }