Exemplo n.º 1
0
        public TalentsRepository(
            IHostingEnvironment IHostingEnvironment,
            IOptions <App_SharedSettings> App_SharedSettings,
            IOptions <Csc_AwsS3Settings> Csc_AwsS3Settings,
            IAwsService IAwsService)
        {
            _IHostingEnvironment = IHostingEnvironment;
            _App_SharedSettings  = App_SharedSettings.Value;
            _Csc_AwsS3Settings   = Csc_AwsS3Settings.Value;
            _IAwsService         = IAwsService;

            string awsCredentialsPath = _IHostingEnvironment.ContentRootPath + _App_SharedSettings.Aws_CredentialsPath;

            _AmazonS3Client = new AmazonS3Client(
                new StoredProfileAWSCredentials(
                    _Csc_AwsS3Settings.Profile,
                    awsCredentialsPath),
                RegionEndpoint.GetBySystemName(_Csc_AwsS3Settings.Region));
        }
Exemplo n.º 2
0
 public EmailService(IOptions <App_SharedSettings> App_SharedSettings)
 {
     _App_SharedSettings = App_SharedSettings.Value;
 }