示例#1
0
文件: App.cs 项目: makhin/PhotoBank
 public App(IPhotoProcessor photoProcessor, IRepository <Storage> repository, IFaceService faceService, ILogger <App> logger, ISyncService syncService, IPhotoService photoService)
 {
     _photoProcessor = photoProcessor;
     _repository     = repository;
     _faceService    = faceService;
     _logger         = logger;
     _syncService    = syncService;
     _photoService   = photoService;
 }
示例#2
0
        public FlickrService(IPhotoProcessor photoProcessor, IUiController ui, FlickrConfig config)
        {
            _ui             = ui;
            _config         = config;
            _photoProcessor = photoProcessor;
            _flickr         = new Flickr(_config.ApiKey, _config.ApiSecret);

            this.Authenticate();
        }
示例#3
0
        public SongCameraViewModel(IPhotoProcessor ipp)
        {
            ProcessCommand = new Command(ProcessPictureInfo);

            photoAnalyzer = ipp;

            detectFromPhotos = new ProcessorOptions[]                              // Put this into the View
            {
                new ProcessorOptions("NAME", new Regex(@"^[\d\.]+\b(.+)"), false), // Learn to make better regexes me ;-;
                new ProcessorOptions("SCORE", new Regex(@"^MARVELOUS (\d+)"), false)
            };
        }
示例#4
0
 public Workflow(IUiController uiController, IFlickrService flickrService,
                 IInputDocumentParser inputDocumentParser, IFileService fileService,
                 IValidator validator, IPostFormatter formatter, IPhotoProcessor photoProcessor)
 {
     _ui             = uiController;
     _flickr         = flickrService;
     _inputDocParser = inputDocumentParser;
     _fileSvc        = fileService;
     _formatter      = formatter;
     _validator      = validator;
     _photoProcessor = photoProcessor;
 }
        protected override void EstablishContext()
        {
            var schoolInformationRepository = mocks.StrictMock<IRepository<SchoolInformation>>();

            photoProcessor = mocks.StrictMock<IPhotoProcessor>();
            errorLoggingService = mocks.StrictMock<IErrorLoggingService>();

            Expect.Call(schoolInformationRepository.GetAll()).Return(
                new List<SchoolInformation>
                    {
                        new SchoolInformation {SchoolId = 222, LocalEducationAgencyId = LocalEducationAgencyId},
                        new SchoolInformation {SchoolId = 333, LocalEducationAgencyId = LocalEducationAgencyId},
                        new SchoolInformation {SchoolId = 444, LocalEducationAgencyId = LocalEducationAgencyId + 900}
                    }.
                    AsQueryable());

            photoManagementService = new PhotoManagementService(schoolInformationRepository, photoProcessor, errorLoggingService);
        }
示例#6
0
        private const int MAX_PHOTO_SIZE_IN_BYTES = 30 * 1024 * 1024; // 30 MB

        public UploadApiController(
            IPathUtil pathUtil,
            IDirectoryWrapper directoryWrapper,
            IFileHelper fileHelper,
            IFileWrapper fileWrapper,
            IPhotoService photoService,
            IAlbumService albumService,
            ICryptoProvider cryptoProvider,
            IPhotoProcessor photoProcessor,
            ICollageProcessor collageProcessor)
        {
            _pathUtil         = pathUtil;
            _directoryWrapper = directoryWrapper;
            _fileHelper       = fileHelper;
            _fileWrapper      = fileWrapper;
            _photoService     = photoService;
            _albumService     = albumService;
            _cryptoProvider   = cryptoProvider;
            _photoProcessor   = photoProcessor;
            _collageProcessor = collageProcessor;
        }
示例#7
0
 public UploadController(IWebHostEnvironment webHostEnvironment, IPhotoProcessor photoProcessor, IRepository <Storage> repository)
 {
     _webHostEnvironment = webHostEnvironment;
     _photoProcessor     = photoProcessor;
     _repository         = repository;
 }
示例#8
0
 public PhotoController(IPhotoProcessor photoProcessor)
 {
     _photoProcessor = photoProcessor;
 }
示例#9
0
 public PhotoController(IPhotoProcessor photoProcessor, IPhotoProvider photoProvider)
 {
     this.photoProvider  = photoProvider;
     this.photoProcessor = photoProcessor;
 }