Example #1
0
        public App()
        {
            InitializeComponent();

            PlantService = new MockPlantService();
            MainPage     = new NavigationPage(new PlantsPage());
        }
Example #2
0
 public UserPlantUseCases(IUserService userService, IUserPlantService userPlantService, IUserPlantActivityService userPlantActivityService, IPlantService plantService)
 {
     _userService              = userService ?? throw new ArgumentNullException(nameof(userService));
     _userPlantService         = userPlantService ?? throw new ArgumentNullException(nameof(userPlantService));
     _userPlantActivityService = userPlantActivityService ?? throw new ArgumentNullException(nameof(userPlantActivityService));
     _plantService             = plantService ?? throw new ArgumentNullException(nameof(plantService));
 }
Example #3
0
 public SuggestionsViewModel(
     ILocationService locationService,
     IPlantService plantService)
 {
     this.locationService = locationService;
     this.plantService    = plantService;
 }
Example #4
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();
        }
Example #5
0
 public PlantController(IM.NETCore.Core.Linq.IRepository <DbContext> repository, IPlantService plantService,
                        IPlantPropertyMappingService plantPropertyMappingService)
 {
     _repository   = repository;
     _plantService = plantService;
     _plantPropertyMappingService = plantPropertyMappingService;
 }
Example #6
0
 public AddPlantPageModel(IPlantService plantService, IPhotoPickerService photoPickerService)
 {
     _newPlant           = new Plant();
     _newPlant.Since     = DateTime.Now;
     _plantService       = plantService;
     _photoPickerService = photoPickerService;
 }
Example #7
0
 public MainPageModel(IUserService userService, IPlantService plantService, IPhotoPickerService photoPickerService)
 {
     this._gardenName         = "My Garden";
     this._userService        = userService;
     this._plantService       = plantService;
     this._photoPickerService = photoPickerService;
 }
 public PlantModule(IPlantService svc)
     : base("/plants")
 {
     Get["/"] = x =>
     {
         return(Response.AsJson <object>(svc.GetAll()));
     };
 }
Example #9
0
 public ModeBase()
 {
     _deviceService  = ServiceLocator.Current.GetInstance <IDeviceService>();
     _turretService  = ServiceLocator.Current.GetInstance <ITurretService>();
     _configService  = ServiceLocator.Current.GetInstance <IConfigService>();
     _plantService   = ServiceLocator.Current.GetInstance <IPlantService>();
     _physicsService = ServiceLocator.Current.GetInstance <IPhysicsService>();
 }
Example #10
0
 public PlantsController(
     ILogger <PlantsController> logger,
     IMapper mapper,
     IPlantService plantService)
 {
     _logger       = logger;
     _mapper       = mapper;
     _plantService = plantService;
 }
Example #11
0
 public MeasuresJobHelper(IConfigurationProvider configProvider, IMeasureService service, IFtpClient ftpClient, IMeasureFileExtracter measureFileExtracter, IPlantPowerService plantPowerService, IPlantPowerFileExtracter plantPowerFileExtracter, IPlantService plantService)
 {
     _configProvider = configProvider;
     _service = service;
     _ftpClient = ftpClient;
     _measureFileExtracter = measureFileExtracter;
     _plantPowerService = plantPowerService;
     _plantPowerFileExtracter = plantPowerFileExtracter;
     _plantService = plantService;
 }
 public SyncService(
     IPlantService plantService,
     IGraphService graphService,
     IPersonService personService,
     IAccessService accessService,
     ILogger <SyncService> logger)
 {
     _plantService  = plantService;
     _graphService  = graphService;
     _personService = personService;
     _accessService = accessService;
     _logger        = logger;
 }
Example #13
0
        public MainForm(IAuthService authService, IFormFactory formFactory, IChoreService choreService,
                        IPlantService plantService)
        {
            _authService  = authService;
            _formFactory  = formFactory;
            _choreService = choreService;
            _plantService = plantService;
            InitializeComponent();
            // Save();
            LoadChores();

            lblYourName.Text = @$ "Hello {_authService.Name}!";
        }
 public AccessService(
     IPersonService personService,
     IPersonProjectService personProjectService,
     IPlantService plantService,
     ILogger <AccessService> logger,
     IUnitOfWork unitOfWork,
     PersonCreatedByCache personCreatedByCache)
 {
     _personService        = personService;
     _personProjectService = personProjectService;
     _plantService         = plantService;
     _logger               = logger;
     _unitOfWork           = unitOfWork;
     _personCreatedByCache = personCreatedByCache;
 }
Example #15
0
        public ViewModel1(IPlantService PlantService, IEventAggregator eventAggregator)
        {
            _PlantService    = PlantService;
            _eventAggregator = eventAggregator;

            // Get the data model from the data service.
            _model = _PlantService.GetModel();

            // Initialize the CollectionView for the underlying model
            // and track the current selection.
            PlantsCV = new ListCollectionView(_model);
            PlantsCV.CurrentChanged += new EventHandler(SelectedItemChanged);

            // Initialize this ViewModel's commands.
            Command1 = new DelegateCommand <string>(ExecuteCommand1, CanExecuteCommand1);
        }
Example #16
0
 public PlantController(IPlantService plantService)
 {
     this.plantService = plantService;
 }
Example #17
0
        private void prepareContextData(IJobExecutionContext context)
        {
            _logger.Info("Getting Job Data from context");

            var confProvider = context.Trigger.JobDataMap.Get("ConfigurationProvider") as IConfigurationProvider;
            if (confProvider == null)
                throw new ArgumentException("Cant get IConfigurationProvider from context");
            _configProvider = confProvider;

            var ftpClient = context.Trigger.JobDataMap.Get("FtpClient") as IFtpClient;
            if (ftpClient == null)
                throw new ArgumentException("Cant get IFtpClient from context");
            _ftpClient = ftpClient;

            var service = context.Trigger.JobDataMap.Get("MeasureService") as IMeasureService;
            if (service == null)
                throw new ArgumentException("Cant get IMeasureService from context");
            _measureService = service;

            var plantPowerService = context.Trigger.JobDataMap.Get("PlantPowerService") as IPlantPowerService;
            if (plantPowerService == null)
                throw new ArgumentException("Cant get IPlantPowerService from context");
            _plantPowerService = plantPowerService;

            var plantService = context.Trigger.JobDataMap.Get("PlantService") as IPlantService;
            if (plantService == null)
                throw new ArgumentException("Cant get IPlantService from context");
            _plantService = plantService;

            var extracter = context.Trigger.JobDataMap.Get("MeasureFileExtracter") as IMeasureFileExtracter;
            if (extracter == null)
                throw new ArgumentException("Cant get IMeasureFileExtracter from context");
            _fileExtracter = extracter;

            var extracterPlantPower = context.Trigger.JobDataMap.Get("PlantPowerFileExtracter") as IPlantPowerFileExtracter;
            if (extracterPlantPower == null)
                throw new ArgumentException("Cant get IPlantPowerFileExtracter from context");
            _filePlantPowerExtracter = extracterPlantPower;

            _logger.Info("Done getting Job Data from context");
        }
 public PlantPowerFileExtracter(IConfigurationProvider configProvider, IPlantService plantService)
 {
     _confProvider = configProvider;
     _plantService = plantService;
 }
 public PlantDetailPageModel(IPlantService plantService, IPhotoPickerService photoPickerService)
 {
     this._plantService       = plantService;
     this._photoPickerService = photoPickerService;
 }
Example #20
0
 public TokenReceiver(IPlantService plantService)
 {
     this.plantService = plantService;
 }
Example #21
0
 public PlantsController()
 {
     this.plantService = new PlantServiceImpl();
 }
 public PlantServiceTests()
 {
     _mockRepository = new Mock <IPlantRepository>();
     _plantService   = new PlantService(_mockRepository.Object);
 }
Example #23
0
 public PlantController(IPlantService plantService, IMapper mapper, ILogger <PlantController> logger)
 {
     _plantService = plantService;
     _mapper       = mapper;
     _logger       = logger;
 }
Example #24
0
 public PlantsController(IPlantService service)
 {
     this._service = service;
 }
 public FarmController(IFarmService farmService,
                       IPlantService plantService)
 {
     this.farmService  = farmService;
     this.plantService = plantService;
 }
Example #26
0
 public PlantsController(IPlantService plantService)
 {
     PlantService = plantService;
 }
Example #27
0
 public MeasureFileExtracter(IConfigurationProvider configProvider, IPlantService plantService)
 {
     _confProvider = configProvider;
 }
Example #28
0
 public PlantsController(IPlantService plantService, IWebHostEnvironment env)
 {
     _plantService = plantService;
     _env          = env;
 }
Example #29
0
        public PlantController()
        {
            IPlantRepository plantRepository = new PlantRepository();

            _plantService = new PlantService(plantRepository);
        }
 public MyPlantsController(IPlantService plantService)
 {
     this.plantService = plantService;
 }
Example #31
0
 public PlantApiController()
 {
     this._iPlantService = EngineContext.Resolve <IPlantService>();
 }
Example #32
0
 public PlantUseCases(IPlantService plantService)
 {
     _plantService = plantService ?? throw new ArgumentNullException(nameof(plantService));
 }