public WatermarkService(IAzureImageUploadComponent azureImageUpload, IImageValidator imageValidator, IWebHostEnvironment environment, ILogger <WatermarkService> logger) { CreateFoldersIfNeeded(); _azureImageUpload = azureImageUpload; _logger = logger; _imageValidator = imageValidator; _environment = environment; }
public ImageValidatorTest() { configuration = new ConfigurationBuilder() .AddInMemoryCollection(configurationSettings) .Build(); imageValidator = new ImageValidator(configuration); }
/// <summary> /// /// </summary> /// <param name="imageValidation"></param> /// <param name="imageBuilder"></param> /// <param name="attachmentManager"></param> /// <param name="videoManager"></param> /// <param name="videoValidator"></param> public FileManager(IImageValidator imageValidation, IImageBuilder imageBuilder, IAttachmentManager attachmentManager, IVideoManager videoManager, IVideoValidator videoValidator, IConfigurationManager configurationManager) { _imageValidation = imageValidation; _imageBuilder = imageBuilder; _attachmentManager = attachmentManager; _videoManager = videoManager; _videoValidator = videoValidator; _configurationManager = configurationManager; }
public ImageService( IUOW UOW, ILogging Logging, ICurrentContext CurrentContext, IImageValidator ImageValidator ) { this.UOW = UOW; this.Logging = Logging; this.CurrentContext = CurrentContext; this.ImageValidator = ImageValidator; }
public ImageService(DataContext dataContext, IFileStorage fileStorage, IImageValidator validator, ImageResizeService resizeService, FreeLimitsChecker freeLimits) { Ensure.NotNull(dataContext, "dataContext"); Ensure.NotNull(fileStorage, "fileStorage"); Ensure.NotNull(validator, "validator"); Ensure.NotNull(resizeService, "resizeService"); Ensure.NotNull(freeLimits, "freeLimits"); this.dataContext = dataContext; this.fileStorage = fileStorage; this.validator = validator; this.resizeService = resizeService; this.freeLimits = freeLimits; }
public MotionSensorStartup(MotionSensorSetup setup) { //setup the extractor imageExtractor = new ImageExtractor(setup.camera); imageExtractor.framerateBroadcast += new ImageExtractor.FramerateBroadcastEvent(FramerateBroadcastEventHandler); imageExtractor.asyncrohous = true; //set up the save file object imageSaver = new ImageSaver(setup.imageSaveLocation, "movement", setup.camera.cameraId); imageSaver.saveToFileServer = true; //setup.saveImagesToFileServer; imageSaver.saveToDatabase = setup.saveImagesToDatabase; imageSaver.ParentDirectory = setup.imageSaveLocation; captureId = imageSaver.captureId; //set up the database object if(setup.saveImagesToDatabase) { database = new CaptureDb(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); database.CreateCaptureSession(captureId, imageSaver.SaveDirectory); detectionId = database.CreateDetectionSession(captureId); imageSaver.detectionId = detectionId; } //setup the motion sensor motionSensor = new MotionSensor_2a(); motionSensor.settings = new MotionSensorSettings(); motionSensor.settings.LoadDefaults(); motionSensor.motionDetected += new MotionSensor_2.MotionDetected(imageSaver.ImageCreatedAsync); //create the validator imageValidator = new ImageValidator(); imageValidator.ListenForImages(imageExtractor); imageValidator.imageValidated += new ImageValidator.ImageValidatedEvent(motionSensor.ImageCreatedAsync);//subscribe to events from the validator //setup the alarms alarms = new List<IAlarm>(); if (setup.emailAlarm != null) { alarms.Add(setup.emailAlarm as EmailAlarm); imageSaver.imageCreated += new ImageSaver.ImageSavedEvent(setup.emailAlarm.ImageExtracted); } imageExtractor.Run(); }
public MotionSensorStartup(MotionSensorSetup setup) { //setup the extractor imageExtractor = new ImageExtractor(setup.camera); imageExtractor.framerateBroadcast += new ImageExtractor.FramerateBroadcastEvent(FramerateBroadcastEventHandler); imageExtractor.asyncrohous = true; //set up the save file object imageSaver = new ImageSaver(setup.imageSaveLocation, "movement", setup.camera.cameraId); imageSaver.saveToFileServer = true; //setup.saveImagesToFileServer; imageSaver.saveToDatabase = setup.saveImagesToDatabase; imageSaver.ParentDirectory = setup.imageSaveLocation; captureId = imageSaver.captureId; //set up the database object if (setup.saveImagesToDatabase) { database = new CaptureDb(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); database.CreateCaptureSession(captureId, imageSaver.SaveDirectory); detectionId = database.CreateDetectionSession(captureId); imageSaver.detectionId = detectionId; } //setup the motion sensor motionSensor = new MotionSensor_2a(); motionSensor.settings = new MotionSensorSettings(); motionSensor.settings.LoadDefaults(); motionSensor.motionDetected += new MotionSensor_2.MotionDetected(imageSaver.ImageCreatedAsync); //create the validator imageValidator = new ImageValidator(); imageValidator.ListenForImages(imageExtractor); imageValidator.imageValidated += new ImageValidator.ImageValidatedEvent(motionSensor.ImageCreatedAsync);//subscribe to events from the validator //setup the alarms alarms = new List <IAlarm>(); if (setup.emailAlarm != null) { alarms.Add(setup.emailAlarm as EmailAlarm); imageSaver.imageCreated += new ImageSaver.ImageSavedEvent(setup.emailAlarm.ImageExtracted); } imageExtractor.Run(); }
public ImageValidatorTests(){ _IImageValidator = new ImageValidator(); }
public UploadImage(IProductRepository repository, IImageValidator validator) { _repository = repository; _validator = validator; }
public ImageWorkerService(IImageValidator imageValidator) { _imageValidator = imageValidator; }