예제 #1
0
 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();
 }
예제 #2
0
 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 });
     }
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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
             });
         }
     }
 }