コード例 #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>();
        }
コード例 #2
0
 public AwsService(IOptions <AwsOptions> options)
 {
     _options = options.Value;
 }