Example #1
0
        public ICommandStrategyFactory <IButtonCommand> CreateButtonCSF(
            IBotClient botClient,
            ISourceRepository sourceRepo,
            IMetricRepository metricRepo,
            IValueRepository valueRepo)
        {
            var buttonCommands = new List <IButtonCommand>
            {
                new AddMetricButtonCommand(botClient, sourceRepo),
                new ChooseDelMetricButtonCommand(botClient, sourceRepo, metricRepo),
                new ChooseDelValueButtonCommand(botClient, metricRepo, valueRepo),
                new ChooseMainMetricButtonCommand(botClient, sourceRepo, metricRepo),
                new DelMetricButtonCommand(botClient, sourceRepo, metricRepo),
                new DelValueButtonCommand(botClient, valueRepo),
                new FileMenuButtonCommand(botClient),
                new FromJsonButtonCommand(botClient),
                new PlotButtonCommand(botClient, metricRepo, valueRepo),
                new MetricMenuButtonCommand(botClient),
                new SetMainMetricButtonCommand(botClient, metricRepo),
                new ShowMetricButtonCommand(botClient, metricRepo),
                new ToJsonButtonCommand(botClient, metricRepo, sourceRepo),
                new TopMenuButtonCommand(botClient),
            };

            return(new ButtonCommandStrategyFactory(buttonCommands));
        }
Example #2
0
 public RepositoryManager(
     DataContext context,
     IValueRepository value)
 {
     this._context = context;
     Value         = value;
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValueService"/> class.
 /// </summary>
 public ValueService(
     IValueRepository valueRepository,
     IMapper mapper)
 {
     _valueRepository = valueRepository ?? throw new ArgumentNullException(nameof(valueRepository));
     _mapper          = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
Example #4
0
        public MainWindow()
        {
            InitializeComponent();
            _gridConfiguraitonRepository = new GridConfiguraitonRepository();

            _temperatures            = new ValueRepository <TemperatureValue>(MainWindow_CollectionChanged);
            _temperatureChartManager = new TemperatureChartManager(_temperatures);

            _pressures            = new ValueRepository <PressureValue>(MainWindow_CollectionChanged);
            _pressureChartManager = new PressureChartManager(_pressures);

            _vacuums            = new ValueRepository <VacuumValue>(MainWindow_CollectionChanged);
            _vacuumChartManager = new VacuumChartManager(_vacuums);


            _dataGridManager = new DataGridManager(_gridConfiguraitonRepository, _pressures, _temperatures, _vacuums);
            _controlManager  = new ControlManager(_gridConfiguraitonRepository);
            _gridManager     = new GridManager(_dataGridManager, _controlManager);

            _fileControl = new FileControl(_pressures, _temperatures, _vacuums);
            _pdfControl  = new PDFControl(_pressures, _temperatures, _vacuums,
                                          (PressureChartManager)_pressureChartManager, (TemperatureChartManager)_temperatureChartManager,
                                          (VacuumChartManager)_vacuumChartManager);

            gridValues.Children[2].Visibility = Visibility.Hidden;
            TotalTIme.Text = "Tempo total: " + _temperatures.getTotalTime().ToString();
            UpdateGrid();
            MainWindow_CollectionChanged();
        }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValueService"/> class.
 /// </summary>
 public ValueService(
     IValueRepository valueRepository,
     IMapper mapper)
 {
     _valueRepository = Guard.Argument(valueRepository, nameof(valueRepository)).NotNull().Value;
     _mapper          = Guard.Argument(mapper, nameof(mapper)).NotNull().Value;
 }
Example #6
0
 public FileControl(IValueRepository <PressureValue> pressureRepository,
                    IValueRepository <TemperatureValue> temperatureRepository,
                    IValueRepository <VacuumValue> vacauumRepository)
 {
     _pressureRepository    = pressureRepository;
     _temperatureRepository = temperatureRepository;
     _vacauumRepository     = vacauumRepository;
 }
Example #7
0
 public ValuesController(IStringLocalizer <SharedResource> i18N, IPokemonApi pokemon,
                         IBus bus, IValueRepository repository, IDistributedCache cache)
 {
     _i18N       = i18N;
     _pokemon    = pokemon;
     _bus        = bus;
     _repository = repository;
     _cache      = cache;
 }
Example #8
0
 public UnitOfWork(IProductRepository productRepository,
                   IAttributeRepository attributeRepository,
                   ICategoryRepository categoryRepository,
                   IValueRepository valueRepository)
 {
     ProductRepository   = productRepository;
     AttributeRepository = attributeRepository;
     CategoryRepository  = categoryRepository;
     ValueRepository     = valueRepository;
 }
        public PhotosController(IValueRepository repository, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            this.repository       = repository;
            this.cloudinaryConfig = cloudinaryConfig;
            this.mapper           = mapper;

            Account account = new Account(cloudinaryConfig.Value.CloudName, cloudinaryConfig.Value.ApiKey, cloudinaryConfig.Value.ApiSecret);

            cloudinary = new Cloudinary(account);
        }
Example #10
0
        public ValuesController(IValueRepository valueRepository, ISettings settings)
        {
            if (valueRepository == null)
            {
                throw new ArgumentNullException(nameof(valueRepository));
            }

            _valueRepository = valueRepository;
            _settings        = settings;
        }
Example #11
0
        public void Setup()
        {
            var serviceProvider = Startup.ServiceProvider;

            if (serviceProvider != null)
            {
                _valueRepository  = serviceProvider.GetService <IValueRepository>();
                _valuesController = new ValuesController(_valueRepository);
            }
        }
 public DataGridManager(IGridConfiguraitonRepository gridConfiguraitonRepository,
                        IValueRepository <PressureValue> pressureRepository,
                        IValueRepository <TemperatureValue> temperatureRepository,
                        IValueRepository <VacuumValue> vacauumRepository)
 {
     _gridConfiguraitonRepository = gridConfiguraitonRepository;
     _pressureRepository          = pressureRepository;
     _temperatureRepository       = temperatureRepository;
     _vacauumRepository           = vacauumRepository;
 }
Example #13
0
        public UnitOfWork(ComputerSalonContext context)
        {
            this.context = context;

            AttributeRepository            = new AttributeRepository(context);
            TypeRepository                 = new TypeRepository(context);
            SystemBlockRepository          = new SystemBlockRepository(context);
            SystemBlockComponentRepository = new SystemBlockComponentRepository(context);
            ComponentRepository            = new ComponentRepository(context);
            ValueRepository                = new ValueRepository(context);
        }
Example #14
0
 public ValueHandlerService(
     ILogger <ValueHandlerService> logger,
     IBotClient botClient,
     IMetricRepository metricRepository,
     IValueRepository valueRepository)
 {
     _logger           = logger;
     _botClient        = botClient;
     _metricRepository = metricRepository;
     _valueRepository  = valueRepository;
 }
Example #15
0
 public RepositoryWrapper(
     IDataContext context,
     ISensorRepository sensorRepository,
     ITimeRepository timeRepository,
     IValueRepository valueRepository,
     ILogger <RepositoryWrapper> logger)
 {
     _context = context;
     Sensors  = sensorRepository;
     Times    = timeRepository;
     Values   = valueRepository;
     _logger  = logger;
 }
Example #16
0
 public PDFControl(IValueRepository <PressureValue> pressureRepository,
                   IValueRepository <TemperatureValue> temperatureRepository,
                   IValueRepository <VacuumValue> vacauumRepository,
                   PressureChartManager pressureChartManager,
                   TemperatureChartManager temperatureChartManager,
                   VacuumChartManager vacuumChartManager)
 {
     _pressureRepository      = pressureRepository;
     _temperatureRepository   = temperatureRepository;
     _vacauumRepository       = vacauumRepository;
     _vacuumChartManager      = vacuumChartManager;
     _temperatureChartManager = temperatureChartManager;
     _pressureChartManager    = pressureChartManager;
 }
 public ValuesController(IValueRepository repo)
 {
     repository = repo;
 }
Example #18
0
 public PlotButtonCommand(IBotClient botClient, IMetricRepository metricRepository, IValueRepository valueRepository)
 {
     _botClient        = botClient;
     _metricRepository = metricRepository;
     _valueRepository  = valueRepository;
 }
 public ValuesController(IValueRepository valueRepository, IMapper mapper)
 {
     _valueRepository = valueRepository;
     _mapper          = mapper;
 }
Example #20
0
 public HomeController(IValueRepository repository)
 {
 }
Example #21
0
 public ValueService(IValueRepository _valueRepository)
 {
     valueRepository = _valueRepository;
 }
 public ConsoleApp(IWriter writer, IValueRepository repository)
 {
     _writer = writer;
     _repos  = repository;
 }
 public VacuumChartManager(IValueRepository <VacuumValue> pressureRepositoy)
 {
     _pressureRepositoy = pressureRepositoy;
 }
Example #24
0
 public ValuesController(IValueRepository valuesRepository)
 {
     _valuesRepository = valuesRepository;
 }
Example #25
0
 public PutValueEndpoint(IValueRepository repository)
 {
     this.repository = repository;
 }
 //Using constructor injection to inject the repository
 public ValueService(IValueRepository repo, HttpClient client)
 {
     this.repo   = repo;
     this.client = client;
 }
 public HomeController(IValueRepository valueRepository)
 {
     _valueRepository = valueRepository;
 }
 public ValuesController(IValueRepository values)
 {
     Values = values;
 }
Example #29
0
 public ValuesController(IValueRepository repo)
 {
     this.repo = repo;
 }
Example #30
0
 public ValueService(IValueRepository valueRepository)
 {
     _valueRepository = valueRepository;
 }