static S3() { StaticRepository = Static.Locator.Resolve <IS3Repository>(); var config = Static.Locator.Resolve <Configuration>(); BucketName = config["S3BucketName"]; }
public App(ILogger <App> logger, IS3Repository s3Repository, IDataConverter dataConverterService, IDataUploader dataUploader) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _s3Repository = s3Repository ?? throw new ArgumentNullException(nameof(s3Repository)); _dataConverterService = dataConverterService ?? throw new ArgumentNullException(nameof(dataConverterService)); _dataUploader = dataUploader ?? throw new ArgumentNullException(nameof(dataUploader)); }
static S3Repository() { var customRepository = ConfigurationManager.AppSettings["S3Repository"]; BucketName = ConfigurationManager.AppSettings["S3BucketName"]; if (customRepository != null) { var type = Type.GetType(customRepository); if (type == null) { throw new ConfigurationErrorsException("Custom S3 repository (" + customRepository + @") not found. Please check your settings."); } Repository = Activator.CreateInstance(type) as IS3Repository; if (Repository == null) { throw new ConfigurationErrorsException("Custom S3 repository (" + customRepository + @") does not implement IS3Repository interface. Please check your settings."); } } else { Repository = new LitS3Repository(); } }
public PartitionService(ILogger logger, IS3Repository s3Repository, IEphemeralRepository ephemeralRepository, IScenarioSummaryRepository scenarioSummaryRepository) { _logger = logger.ForContext <PartitionService>(); _s3Repository = s3Repository; _ephemeralRepository = ephemeralRepository; _scenarioSummaryRepository = scenarioSummaryRepository; }
public FileUploadService(IAmazonS3 s3Client, IFileUploadSettings fileUploadSettings, IFileUploadRepository fileUploadRepository, IS3CsvRepository s3Repository, IFileUploadScenarioRepository fileUploadScenarioRepository) { _s3Client = s3Client; _fileUploadSettings = fileUploadSettings; _fileUploadRepository = fileUploadRepository; _s3Repository = s3Repository; _fileUploadScenarioRepository = fileUploadScenarioRepository; }
public static Task Upload(this IS3Repository repository, string bucket, string key, byte[] bytes) { #if PORTABLE return(repository.Upload(bucket, key, new MemoryStream(bytes), bytes.Length, null)); #else return(repository.Upload(bucket, key, new MemoryStream(bytes), bytes.LongLength, null)); #endif }
public FileDomainService(IFileRepository repository, IS3Repository s3Repository , IRepository <byte[], FileContent> fileContentRepository, IConfigService configService) { this._repository = repository; this._s3Repository = s3Repository; this._fileContentRepository = fileContentRepository; this._configService = configService; ; }
private void OnDeserialized(StreamingContext context) { var locator = context.Context as IServiceProvider; if (locator == null) { return; } InstanceRepository = locator.Resolve <IS3Repository>(); }
public DbToS3DomainService( IConfigService configService, IFileDomainService fileDomainService, IS3Repository s3Repository, IRepository <byte[], FileContent> linkRepository) { this._configService = configService; this._fileDomainService = fileDomainService; this._s3Repository = s3Repository; this._linkRepository = linkRepository; }
public FileDomainService(IConfigService configService, IFileLimitDomainService fileLimitDomainService, IRepository <string, File> repository, IS3Repository s3Repository, IRepository <string, FileContent> fileContentRepository) { this._configService = configService; this._fileLimitDomainService = fileLimitDomainService; this._repository = repository; this._s3Repository = s3Repository; this._fileContentRepository = fileContentRepository; }
public async Task <object> GetResourceDetails(MonitoringResourceRequest monitoringResourceRequest) { s3Repository = new S3Repository(); s3Repository.Region = monitoringResourceRequest.Region; var response = await s3Repository.GetS3Details(); var mapResponse = response.Buckets.Select(x => new S3Response() { BucketName = x.BucketName, CreatedDate = x.CreationDate.ToString(), Region = monitoringResourceRequest.Region }); return(response); }
public async Task <MonitoringSummaryResponse> GetResources(string region) { s3Repository = new S3Repository(); s3Repository.Region = region; var response = await s3Repository.GetS3Details(); var resources = response.Buckets.Select(x => x.BucketName).ToList(); return(new MonitoringSummaryResponse() { Label = "AWS/S3", Count = resources.Count, ResourcesId = resources }); }
static S3Repository() { var customRepository = ConfigurationManager.AppSettings["S3Repository"]; BucketName = ConfigurationManager.AppSettings["S3BucketName"]; if (customRepository != null) { var type = Type.GetType(customRepository); if (type == null) throw new ConfigurationErrorsException("Custom S3 repository (" + customRepository + @") not found. Please check your settings."); Repository = Activator.CreateInstance(type) as IS3Repository; if (Repository == null) throw new ConfigurationErrorsException("Custom S3 repository (" + customRepository + @") does not implement IS3Repository interface. Please check your settings."); } else Repository = new LitS3Repository(); }
static S3() { StaticRepository = Static.Locator.Resolve<IS3Repository>(); var config = Static.Locator.Resolve<Configuration>(); BucketName = config["S3BucketName"]; }
public S3Operations(IS3Repository _s3Repository) { s3Repository = _s3Repository; }
public S3(IS3Repository repository = null) { this.InstanceRepository = repository; this.Metadata = new Dictionary <string, string>(); }
public PolicyService(IPolicyRepository policyRepository, IS3Repository s3Repository, ICrypRepository crypRepository) { _policyRepository = policyRepository; _s3Repository = s3Repository; _crypRepository = crypRepository; }
public MarkdownService(ILogger logger, IMemoryCache cache, IS3Repository s3Repository) { _logger = logger; _ladderPathCache = cache; _s3Repository = s3Repository; }
public DocumentRepository(IS3Repository s3Repository, IKSMRepository kSMRepository) { this.s3Repository = s3Repository; this.kSMRepository = kSMRepository; }
public ScenarioResultService(IS3Repository s3Repository, IRecommendationRepository recommendationRepository, IRecommendationProductRepository recommendationProductRepository) { _s3Repository = s3Repository; _recommendationRepository = recommendationRepository; _recommendationProductRepository = recommendationProductRepository; }
public ModelService(ILogger logger, IS3Repository s3Repository, IEphemeralRepository ephemeralRepository) { _logger = logger.ForContext <ModelService>(); _s3Repository = s3Repository; _ephemeralRepository = ephemeralRepository; }
public static Task Upload(this IS3Repository repository, string bucket, string key, Stream stream) { return(repository.Upload(bucket, key, stream, stream.Length, null)); }
private void OnDeserialized(StreamingContext context) { var locator = context.Context as IServiceProvider; if (locator == null) return; InstanceRepository = locator.Resolve<IS3Repository>(); }
public DocumentController(IDocumentRepository documentRepository, IS3Repository s3Repository, Whitelists whitelists) { this.documentRepository = documentRepository; this.s3Repository = s3Repository; this.whitelists = whitelists; }
public S3(IS3Repository repository = null) { this.InstanceRepository = repository; this.Metadata = new Dictionary<string, string>(); }
public ScenarioService(ILogger logger, IS3Repository s3Repository) { _logger = logger; _s3Repository = s3Repository; }