public ImagesController(IBlogRepository repo, IOptions <ImageServiceOptions> imageServiceOptions, ICloudStorageService cloudService, ILogger <ImagesController> logger) { _repo = repo; _imageServiceOptions = imageServiceOptions; _cloudService = cloudService; _logger = logger; }
public WidgetViewModel(IBlogRepository repo, ICloudStorageService cloudService) { Categories = Mapper.Map <ICollection <CategoryViewModel> >(repo.Categories()); Tags = Mapper.Map <ICollection <TagViewModel> >(repo.Tags()); LastestPosts = Mapper.Map <ICollection <PostViewModel> >(repo.Posts(0, 3)); GetImageUris(LastestPosts, cloudService); }
public MailController(IMailService mailService, ICloudStorageService storageService, IExtensionRequestRepository extensionRequestRepository, UserManager <ApplicationUser> userManager) { _mailService = mailService; _userManager = userManager; _extensionRequestRepository = extensionRequestRepository; }
public DirectoryWatcher(DirectoryOptions options, ICloudStorageService cloudStorageService, ILogger logger) { this.logger = logger; this.options = options; this.cloudStorageService = cloudStorageService; if (!Directory.Exists(options.LocalPath)) { Directory.CreateDirectory(options.LocalPath); } watcher = new FileSystemWatcher(); watcher.Path = options.LocalPath; watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName; watcher.Changed += OnChanged; if (options.Filters != null) { foreach (var filter in options.Filters) { watcher.Filters.Add(filter); } } watcher.EnableRaisingEvents = true; this.logger.LogInformation($"Started watching directory {options.LocalPath}. Files will be uploaded to {options.RemotePath}"); }
public ChapterController(IChapterAdapter chapterAdapter, IChapterLikesAdapter likesAdapter, ILogger <ChapterController> logger, ICloudStorageService storageService) { this.chapterAdapter = chapterAdapter; this.likesAdapter = likesAdapter; this.logger = logger; this.storageService = storageService; }
public ListViewModel(IBlogRepository repo, ICloudStorageService cloudService, string text, string type, int p) { switch (type) { case "Tag": Posts = Mapper.Map <ICollection <PostViewModel> >(repo.PostsForTag(text, p - 1, 10)); GetImageUris(Posts, cloudService); TotalPosts = repo.TotalPostsForTag(text); Tag = Mapper.Map <TagViewModel>(repo.Tag(text)); break; case "Category": Posts = Mapper.Map <ICollection <PostViewModel> >(repo.PostsForCategory(text, p - 1, 10)); GetImageUris(Posts, cloudService); TotalPosts = repo.TotalPostsForCategory(text); Category = Mapper.Map <CategoryViewModel>(repo.Category(text)); break; default: Posts = Mapper.Map <ICollection <PostViewModel> >(repo.PostsForSearch(text, p - 1, 10)); GetImageUris(Posts, cloudService); TotalPosts = repo.TotalPostsForSearch(text); Search = text; break; } }
public ALLFPeriodEndService( IStorageService storageService, IFileUploadJobMetaDataModelBuilderService fileUploadJobMetaDataModelBuilderService, ICollectionsService collectionService, IPeriodService periodService, IStateService stateService, ICloudStorageService cloudStorageService, IJobService jobService, ILogger logger, AzureStorageSection azureStorageConfig, ApiSettings apiSettings, IHttpClientService httpClientService) { _storageService = storageService; _fileUploadJobMetaDataModelBuilderService = fileUploadJobMetaDataModelBuilderService; _collectionService = collectionService; _periodService = periodService; _stateService = stateService; _cloudStorageService = cloudStorageService; _jobService = jobService; _logger = logger; _azureStorageConfig = azureStorageConfig; _httpClientService = httpClientService; _baseUrl = apiSettings.JobManagementApiBaseUrl; }
public ImageService(IConfiguration configuration, ICloudTableService cloudTableService, ICloudStorageService cloudStorageService) { Configuration = configuration; CloudTableService = cloudTableService; CloudStorageService = cloudStorageService; }
public Worker(ILogger <Worker> logger, IOptions <AzureSyncOptions> options, ICloudStorageService cloudStorageService) { this.logger = logger; this.options = options.Value; this.cloudStorageService = cloudStorageService; watchers = new List <DirectoryWatcher>(); }
public FileManagerService(IFileService fileService, IShortLinkService shortLinkService, ICloudStorageService cloudStorageService, IStatisticsService statisticsService) { _fileService = fileService; _shortLinkService = shortLinkService; _cloudStorageService = cloudStorageService; _statisticsService = statisticsService; }
public AzureCloudStorageServiceTests() { var loggerMock = new Mock <ILogger <AzureCloudStorageService> >(); _cloudStorageFactoryMock = new Mock <ICloudStorageFactory>(); _cloudStorageService = new AzureCloudStorageService(loggerMock.Object, _cloudStorageFactoryMock.Object); }
public AuthController(SignInManager <LunarUser> signInManager, UserManager <LunarUser> userManager, IEmailService emailService, IConfigurationRoot config, ICloudStorageService cloudService) { _userManager = userManager; _signInManager = signInManager; _emailService = emailService; _cloudService = cloudService; _authMail = new MailAddress(config["mailSettings:authEmail:address"], config["mailSettings:authEmail:displayName"]); }
private FileUploadJobMetaDataModelBuilderService NewBuilder( IJobStatusService jobStatusService, ICloudStorageService cloudStorageService, IDateTimeProvider dateTimeProvider, IIndex <PersistenceStorageKeys, IFileService> fileService) { return(new FileUploadJobMetaDataModelBuilderService(jobStatusService, cloudStorageService, dateTimeProvider, fileService)); }
public GalleryViewModel(ICloudStorageService cloudService, IBlogRepository repo, string containerName) { Images = Mapper.Map <ICollection <ImageDescriptionViewModel> >(repo.GetAllImages(containerName).Result); foreach (var img in Images) { img.ImageUri = cloudService.GetImageUri(img.ContainerName, img.FileName); } }
public CompositionController(ICompositionAdapter compositionAdapter, ICompositionRatingsAdapter ratingsAdapter, ICommentsAdapter commentsAdapter, ILogger <CompositionController> logger, ICloudStorageService storageService) { this.compositionAdapter = compositionAdapter; this.ratingsAdapter = ratingsAdapter; this.commentsAdapter = commentsAdapter; this.logger = logger; this.storageService = storageService; }
public TopicsController(ITopicsServices topics, IZipFilesService zipFiles, ISectionService sections, IExamplesService examples, IUsersService usersService, ICloudStorageService drive) { this.topics = topics; this.sections = sections; this.examples = examples; this.zipFiles = zipFiles; this.users = usersService; this.cloudStorage = drive; }
void Initialize( [Inject] ICloudStorageService cloudStorageService ) { _cloudStorageService = cloudStorageService; this.OnEvent <SetStringCommand>().Subscribe(e => SetStringCommandHandler(e)).AddTo(this); this.OnEvent <GetStringCommand>().Subscribe(e => GetStringCommandHandler(e)).AddTo(this); }
public CloudStorageController ( IOptions <S3Configuration> s3Configuration, ICloudStorageService cloudStorageService ) { S3Configuration = s3Configuration.Value; CloudStorageService = cloudStorageService; }
public SyncService(IBookshelfService bookshelfService, IMessageBus messageBus) { _bookshelfService = bookshelfService; _messageBus = messageBus; var service = UserSettings.Synchronization.Enabled ? UserSettings.Synchronization.Service : SynchronizationServicesProvider.Dumb; _cloudStorageService = IocManager.Container.ResolveKeyed <ICloudStorageService>(service); }
public PortfolioViewModel(ICloudStorageService cloudService, IBlogRepository repo) { Projects = Mapper.Map <ICollection <ProjectViewModel> >(repo.GetAllProjects()); foreach (var proj in Projects) { proj.Image.ImageUri = cloudService.GetImageUri(proj.Image?.ContainerName, proj.Image?.FileName); } }
public InstrumentInstallerService( IBlaiseSurveyApi blaiseApi, IFileService fileService, ICloudStorageService storageService) { _blaiseSurveyApi = blaiseApi; _fileService = fileService; _storageService = storageService; }
public AboutMeViewModel(ICloudStorageService cloudService, IBlogRepository repo) { Events = Mapper.Map <ICollection <TimelineEventViewModel> >(repo.GetTimelineEvents("aboutMe").Result); foreach (var ev in Events) { ev.Image.ImageUri = cloudService.GetImageUri(ev.Image.ContainerName, ev.Image.FileName); } }
public UploadAudioCommandHandler(ContentContext db, ICloudStorageService cloudStorageservice) { _db = db; _cloudStorageService = cloudStorageservice; _mapperConfiguration = new MapperConfiguration(cfg => { cfg.AddProfile <ContentDAOProfile>(); }); }
private void GetImageUris(ICollection <PostViewModel> posts, ICloudStorageService cloudService) { foreach (var post in posts) { foreach (var img in post.Images) { img.ImageUri = cloudService.GetImageUri(img.ContainerName, img.FileName); } } }
public InstrumentDataService( IFileService fileService, INisraFileImportService caseService, ICloudStorageService storageService, ILoggingService loggingService) { _fileService = fileService; _nisraService = caseService; _storageService = storageService; _loggingService = loggingService; }
public GameSceneService ( IOptions <S3Configuration> s3Configuration, SceneDescriptorRepository sceneDescriptorRepository, ICloudStorageService cloudStorageService ) { S3Configuration = s3Configuration.Value; SceneDescriptorRepository = sceneDescriptorRepository; CloudStorageService = cloudStorageService; }
public FileUploadJobMetaDataModelBuilderService( IJobStatusService jobStatusService, ICloudStorageService cloudStorageService, IDateTimeProvider dateTimeProvider, IIndex <PersistenceStorageKeys, IFileService> fileService) { _jobStatusService = jobStatusService; _cloudStorageService = cloudStorageService; _dateTimeProvider = dateTimeProvider; _fileService = fileService[PersistenceStorageKeys.DctAzureStorage]; }
public NisraMessageHandler( ILog logger, ICloudStorageService bucketFileService, IProcessFilesService processNisraFilesService, ICaseMapper mapper) { _bucketFileService = bucketFileService; _processNisraFilesService = processNisraFilesService; _mapper = mapper; _logger = logger; }
public PostsController(IBlogRepository repo, ICloudStorageService cloudService, ILogger <PostsController> logger, IHttpContextAccessor httpContextAccessor, UserManager <LunarUser> userManager) { _repo = repo; _cloudService = cloudService; _logger = logger; _userManager = userManager; _currentUserId = httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; }
public CloudApiController(ILogger <CloudApiController> logger, IDataAccess dataAccess, IWebHostEnvironment hostEnvironment, UserManager <IdentityUser> userManager, INotificationService notificationService, ICloudStorageService cloudStorageService) { _logger = logger; _dataAccess = dataAccess; _hostEnvironment = hostEnvironment; _userManager = userManager; _notificationService = notificationService; _cloudStorageService = cloudStorageService; }
public EditModel(ICarService carService, IReservationService reservationService, ILogger <EditModel> logger, IEmailSender emailSender, IRazorViewToStringRender render, UserManager <User> userManager , ICloudStorageService cloudStorageService) { _carService = carService; _reservationService = reservationService; _logger = logger; _emailSender = emailSender; _render = render; _userManager = userManager; _cloudStorageService = cloudStorageService; }