public UtilityService(IPhotosService photoService, IConversationService conversationService, IProfileService profileService, IKatushaDbContext dbContext, IDocumentStore ravenStore, IPhotoRepositoryDB photoRepository, IProfileRepositoryDB profileRepository, IUserRepositoryDB userRepository, IPhotoBackupService photoBackupService, ICountriesToVisitRepositoryDB countriesToVisitRepository, ILanguagesSpokenRepositoryDB languagesSpokenRepository, ISearchingForRepositoryDB searchingForRepository, IConversationRepositoryDB conversationRepository, IProfileRepositoryRavenDB profileRepositoryRaven, IVisitRepositoryRavenDB visitRepositoryRaven, IConversationRepositoryRavenDB conversationRepositoryRaven, IKatushaFileSystem fileSystem) { _conversationRepositoryRaven = conversationRepositoryRaven; _fileSystem = fileSystem; _visitRepositoryRaven = visitRepositoryRaven; _profileRepositoryRaven = profileRepositoryRaven; _photoRepository = photoRepository; _photoService = photoService; _conversationService = conversationService; _profileService = profileService; _conversationRepository = conversationRepository; _countriesToVisitRepository = countriesToVisitRepository; _languagesSpokenRepository = languagesSpokenRepository; _searchingForRepository = searchingForRepository; _ravenStore = ravenStore as KatushaRavenStore; _profileRepository = profileRepository; _userRepository = userRepository; _photoBackupService = photoBackupService; _dbContext = dbContext; // as KatushaDbContext; _resourceManager = ResourceManager.GetInstance(); _countries = _resourceManager.GetCountries(); _languages = _resourceManager.GetLanguages(); }
public void AddPhoto(IKatushaFileSystem fileSystem, IPhotoBackupService photoBackupService, Photo photo, HttpPostedFileBase hpf, byte[] thumbnailBytes) { foreach (var suffix in PhotoTypes.Versions.Keys) { var bytes = (suffix == (byte) PhotoType.Thumbnail) ? thumbnailBytes : BuildImage(hpf, suffix); fileSystem.WritePhoto(photo, (PhotoType)suffix, bytes); if (suffix == (byte)PhotoType.Original) photoBackupService.AddPhoto(new PhotoBackup { Guid = photo.Guid, Data = bytes }); } }
public PhotosService(IKatushaGlobalCacheContext cacheContext, IKatushaFileSystem fileSystem, IProfileService profileService, INotificationService notificationService, IConversationService conversationService, IProfileRepositoryDB profileRepository, IPhotoRepositoryDB photoRepository, IPhotoBackupService photoBackupService) { _cacheContext = cacheContext; _fileSystem = fileSystem; _profileService = profileService; _notificationService = notificationService; _conversationService = conversationService; _profileRepository = profileRepository; _photoRepository = photoRepository; _photoBackupService = photoBackupService; }
public PhotosService(IKatushaGlobalCacheContext cacheContext, IKatushaFileSystem fileSystem, IProfileService profileService, INotificationService notificationService, IConversationService conversationService, IProfileRepositoryDB profileRepository, IPhotoRepositoryDB photoRepository, IPhotoBackupService photoBackupService) { _cacheContext = cacheContext; _fileSystem = fileSystem; _profileService = profileService; _notificationService = notificationService; _conversationService = conversationService; _profileRepository = profileRepository; _photoRepository = photoRepository; _photoBackupService = photoBackupService; }
public void AddPhoto(IKatushaFileSystem fileSystem, IPhotoBackupService photoBackupService, Photo photo, HttpPostedFileBase hpf, byte[] thumbnailBytes) { foreach (var suffix in PhotoTypes.Versions.Keys) { var bytes = (suffix == (byte)PhotoType.Thumbnail) ? thumbnailBytes : BuildImage(hpf, suffix); fileSystem.WritePhoto(photo, (PhotoType)suffix, bytes); if (suffix == (byte)PhotoType.Original) { photoBackupService.AddPhoto(new PhotoBackup { Guid = photo.Guid, Data = bytes }); } } }
public DBPhotoBackupService(IKatushaFileSystem filesystem, IPhotoBackupRepositoryDB photoBackupRepository) { _fileSystem = filesystem; _photoBackupRepository = photoBackupRepository; }