public HomeController(ILogger <HomeController> logger,
                       S3DataSyncStorage <string> storage,
                       S3DataSyncStorage2 <string> storage2)
 {
     _logger   = logger;
     _storage  = storage;
     _storage2 = storage2;
 }
Esempio n. 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddSingleton <S3DataSyncStorage <string>, S3DataSyncStorage <string> >(service =>
            {
                var storage = new S3DataSyncStorage <string>("91dev-ap-northeast-1-private-tw-data-sync");
                return(storage);
            });

            services.AddSingleton <S3DataSyncStorage2 <string>, S3DataSyncStorage2 <string> >(service =>
            {
                var storage = new S3DataSyncStorage2 <string>("91dev-ap-northeast-1-private-tw-data-sync");
                return(storage);
            });

            services.AddControllers();
        }