Esempio n. 1
0
 public MembersController(ILogger <MembersController> logger, IPostService postService, UserManager <BlogUser> userManager, IImageProcessorService imageProcessor)
 {
     _logger         = logger;
     _postService    = postService;
     _userManager    = userManager;
     _imageProcessor = imageProcessor;
 }
Esempio n. 2
0
        public TurretService(IImageProcessorService imageProcessorService, ICameraService cameraService,
                             IConfigService configService, IDeviceService deviceService, IPlantService plantService,
                             IPhysicsService measurementService)
        {
            _imageProcessorService = imageProcessorService;
            _cameraService         = cameraService;
            _configService         = configService;
            _deviceService         = deviceService;
            _plantService          = plantService;
            _measurementService    = measurementService;

            ImageProcessorLock = new object();

            // 이미지 프로세싱 작업
            Task.Factory.StartNew(new Action(() =>
            {
                for (; ;)
                {
                    lock (ImageProcessorLock)
                    {
                        if ((DateTime.Now - ImageProcessed).TotalMilliseconds >= 50)
                        {
                            ImageProcess();
                        }
                    }
                    Thread.Sleep(30);
                }
            }));

            _tokenSource = new CancellationTokenSource();
            _exitEvent.Set();
        }
Esempio n. 3
0
 public UserPreferenesService(IUserPreferencesRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IImageProcessorService imageProcessorService, IMapper mapper1) : base(repository, unitOfWork, mapper)
 {
     _repository            = repository;
     _unitOfWork            = unitOfWork;
     _imageProcessorService = imageProcessorService;
     _mapper = mapper1;
 }
 public ImageService(
     IWebClientService webClientService,
     IImageProcessorService imageProcessorService)
 {
     this.webClientService      = webClientService;
     this.imageProcessorService = imageProcessorService;
 }
 public AvatarsService(
     IRepository <Avatar> avatarsRepo,
     IRepository <User> usersRepo,
     IImageProcessorService imageProcessor)
 {
     this.avatars        = avatarsRepo;
     this.users          = usersRepo;
     this.imageProcessor = imageProcessor;
 }
Esempio n. 6
0
 public UserService(UserManager <ApplicationUser, Guid> applicationUserManager, IMapper mapper,
                    IImageProcessorService imageProcessorService, INow now, DatabaseContext context, IImageService imageService)
 {
     _applicationUserManager = applicationUserManager;
     _mapper = mapper;
     _imageProcessorService = imageProcessorService;
     _now          = now;
     _context      = context;
     _imageService = imageService;
 }
Esempio n. 7
0
 public AccountController(UserManager <BlogUser> userManager, SignInManager <BlogUser> signInManager,
                          ILogger <AccountController> logger, IImageProcessorService imageServices,
                          IMailService mailService)
 {
     _userMngr      = userManager;
     _signInMngr    = signInManager;
     _logger        = logger;
     _imageServices = imageServices;
     _mailService   = mailService;
 }
Esempio n. 8
0
 public PostController(ILogger <PostController> logger, IPostService postService, ILikeService likeService, ICommentService commentService,
                       IImageProcessorService imageProcessorService, ICategoryService categoryservices, UserManager <BlogUser> userManager)
 {
     _logger                = logger;
     _postService           = postService;
     _commentService        = commentService;
     _imageProcessorService = imageProcessorService;
     _Categoryservices      = categoryservices;
     _userManager           = userManager;
     _likeService           = likeService;
 }
Esempio n. 9
0
 public ImagesService(
     IRepository<Image> imagesRepo,
     IRepository<User> usersRepo,
     IRepository<Album> albumRepo,
     IImageProcessorService imageProcessor,
     IWebStorageService webSrorageService,
     INotificationService notifier)
     : base(usersRepo)
 {
     this.images = imagesRepo;
     this.albums = albumRepo;
     this.imageProcessor = imageProcessor;
     this.webSrorageService = webSrorageService;
     this.notifier = notifier;
 }
Esempio n. 10
0
 public ImagesService(
     IRepository <Image> imagesRepo,
     IRepository <User> usersRepo,
     IRepository <Album> albumRepo,
     IImageProcessorService imageProcessor,
     IWebStorageService webSrorageService,
     INotificationService notifier)
     : base(usersRepo)
 {
     this.images            = imagesRepo;
     this.albums            = albumRepo;
     this.imageProcessor    = imageProcessor;
     this.webSrorageService = webSrorageService;
     this.notifier          = notifier;
 }
Esempio n. 11
0
        public UploadController(IUploadedImageService imageService, IUserService userService,
                                IImageProcessorService imageProcessorService, IFileSaverService fileSaverService,
                                IUserProvider userProvider)
        {
            Guard.WhenArgument(imageService, "uploadedImageService").IsNull().Throw();
            Guard.WhenArgument(userService, "userService").IsNull().Throw();
            Guard.WhenArgument(imageProcessorService, "imageProcessorService").IsNull().Throw();
            Guard.WhenArgument(fileSaverService, "fileSaverService").IsNull().Throw();
            Guard.WhenArgument(userProvider, "userProvider").IsNull().Throw();

            this.uploadedImageService  = imageService;
            this.userService           = userService;
            this.imageProcessorService = imageProcessorService;
            this.fileSaverService      = fileSaverService;
            this.userProvider          = userProvider;
        }
Esempio n. 12
0
        public UploadImagePresenter(
            IUploadImageView view,
            IUploadedImageService imageService,
            IUserService userService,
            IImageProcessorService imgProcessorService,
            IFileSaverService fileSaverService)
            : base(view)
        {
            Guard.WhenArgument(imageService, "uploadedImageService").IsNull().Throw();
            Guard.WhenArgument(imgProcessorService, "imageProcessorService").IsNull().Throw();
            Guard.WhenArgument(userService, "userService").IsNull().Throw();
            Guard.WhenArgument(fileSaverService, "fileSaverService").IsNull().Throw();

            this.uploadedImageService   = imageService;
            this.userService            = userService;
            this.fileSaverService       = fileSaverService;
            this.imageProcessorService  = imgProcessorService;
            this.View.EventImageUpload += this.OnImageUpload;
        }
Esempio n. 13
0
        public UploadController(
            IImageProcessorService imgProcessorService,
            IFileSaverService fileSaverService,
            IRegularUserService userService,
            IProjectService projectService,
            IStoryService storyService)
        {
            Guard.WhenArgument(imgProcessorService, "imageProcessorService").IsNull().Throw();
            Guard.WhenArgument(fileSaverService, "fileSaverService").IsNull().Throw();
            Guard.WhenArgument(userService, "regularUserService").IsNull().Throw();
            Guard.WhenArgument(projectService, "projectService").IsNull().Throw();
            Guard.WhenArgument(storyService, "storyService").IsNull().Throw();

            this.fileSaverService      = fileSaverService;
            this.imageProcessorService = imgProcessorService;
            this.regularUserService    = userService;
            this.projectService        = projectService;
            this.storyService          = storyService;
        }
Esempio n. 14
0
 public async Task <IActionResult> Generate(
     [FromBody] ImagesPostRequest imagesPostRequest,
     [FromServices] IImageProcessorService imageProcessor)
 => Json(await imageProcessor.ProcessImagesAsync("https://ccc-socialize.azurewebsites.net/", imagesPostRequest));
Esempio n. 15
0
 public ImagesService(IObjectFactory objectFactory, IImageProcessorService imageProcessorService, IRepository <Image> imagesService)
     : base(objectFactory)
 {
     this.imageProcessor = imageProcessorService;
     this.images         = imagesService;
 }
Esempio n. 16
0
 public WorkshopController(IImageProcessorService imageProcessorService, IWorkshopService workshopService)
 {
     _imageProcessorService = imageProcessorService;
     _workshopService = workshopService;
 }
Esempio n. 17
0
 public async Task <IActionResult> Generate(
     [FromBody] ImagesPostRequest imagesPostRequest,
     [FromServices] IImageProcessorService imageProcessor)
 => Json(await imageProcessor.ProcessImagesAsync($"{Request.Scheme}://{Request.Host}{Request.PathBase}", imagesPostRequest));
Esempio n. 18
0
 public IActionResult GetOptions(
     [FromServices] IImageProcessorService imageProcessor)
 => Json(imageProcessor.GetImageOptions());
Esempio n. 19
0
 public ImagesService(IObjectFactory objectFactory, IImageProcessorService imageProcessorService, IRepository<Image> imagesService)
     : base(objectFactory)
 {
     this.imageProcessor = imageProcessorService;
     this.images = imagesService;
 }
 public ImagesService(IObjectFactory objectFactory, IImageProcessorService imageProcessorService)
     : base(objectFactory)
 {
     this.imageProcessor = imageProcessorService;
 }
Esempio n. 21
0
 public ImagesService(IObjectFactory objectFactory, IImageProcessorService imageProcessorService)
     : base(objectFactory)
 {
     this.imageProcessor = imageProcessorService;
 }
 public ImagesController(IImageDownloaderService imageDownloader, IImageProcessorService imageProcessor)
 {
     this.imageDownloader = imageDownloader;
     this.imageProcessor = imageProcessor;
 }
 public UploadImagePresenterMock(IUploadImageView view, IUploadedImageService imageService, IUserService userService, IImageProcessorService imgProcessorService, IFileSaverService fileSaverService) : base(view, imageService, userService, imgProcessorService, fileSaverService)
 {
 }
Esempio n. 24
0
 public ImageService(IStorageProvider storageProvider, DatabaseContext context, IImageProcessorService imageProcessorService)
 {
     _storageProvider       = storageProvider;
     _context               = context;
     _imageProcessorService = imageProcessorService;
 }
Esempio n. 25
0
 public async Task <IActionResult> Generate(
     [FromBody] ImagesPostRequest imagesPostRequest,
     [FromServices] IImageProcessorService imageProcessor)
 => Json(await imageProcessor.ProcessImagesAsync("http://friend-finder-server.azurewebsites.net/", imagesPostRequest));