public ServiceAgreementConfiguration(RuuviStation station, IMongoDataRepository <Agreement> repository)
 {
     this._tags       = station.Tags;
     this._station    = station;
     this._collection = new List <ServiceAgreement>();
     this._repository = repository;
 }
コード例 #2
0
 public ServiceGeometricConfiguration(RuuviStation station, IMongoDataRepository<Route> geometricRepository, IMongoDataRepository<ServiceGeometric> serviceGeometricRepository)
 {
     this._station = station;
     this._collection = new List<ServiceGeometric>();
     this._geometricRepository = geometricRepository;
     this._serviceGeometricRepository = serviceGeometricRepository;
 }
コード例 #3
0
 public ServiceGeometricController(IMongoDataRepository <Route> geometricRepository, IMongoDataRepository <ServiceGeometric> serviceGeometricRepository, IMongoDataRepository <RuuviStation> repositoryRuuviStation, IMapper mapper)
 {
     this._geometricRepository        = geometricRepository;
     this._serviceGeometricRepository = serviceGeometricRepository;
     this._repositoryRuuviStation     = repositoryRuuviStation;
     this._mapper = mapper;
 }
コード例 #4
0
 public WorkerService(IMongoDataRepository <Station> repository, IWorkerSettings settings, IHubContext <LiveStationHub> hub, IMapper mapper)
 {
     this.Hub        = hub;
     this.Mapper     = mapper;
     this.Repository = repository;
     this.Settings   = settings;
 }
コード例 #5
0
 public ServiceAgreementController(IMongoDataRepository <Agreement> agreementRepository, IMongoDataRepository <ServiceAgreement> serviceAgreementRepository, IMongoDataRepository <Station> repositoryStation, IMapper mapper)
 {
     this._repositoryStation          = repositoryStation;
     this._agreementRepository        = agreementRepository;
     this._serviceAgreementRepository = serviceAgreementRepository;
     this._mapper = mapper;
 }
コード例 #6
0
 public ServiceAgreementConfiguration(List <Station> stations, IMongoDataRepository <Agreement> agreementRepository, IMongoDataRepository <ServiceAgreement> serviceAgreementRepository)
 {
     this._stations                   = stations;
     this._collection                 = new List <ServiceAgreement>();
     this._agreementRepository        = agreementRepository;
     this._serviceAgreementRepository = serviceAgreementRepository;
 }
コード例 #7
0
 public PullAqicn(IMongoDataRepository <Station> repository, IWorkerSettings settings, IHubContext <LiveStationHub> hub, IMapper mapper) : base(repository, settings, hub, mapper)
 {
     this.Hub        = base.Hub;
     this.Mapper     = mapper;
     this.Repository = repository;
     this.Settings   = settings;
     this.Client     = new HttpClient();
 }
コード例 #8
0
 public RuuviStationsController(IMongoDataRepository <Route> repositoryGeometric, IMongoDataRepository <ServiceGeometric> serviceGeometricRepository, IMongoDataRepository <Agreement> repositoryAgreement, IMongoDataRepository <ServiceAgreement> serviceAgreementRepository, IMongoDataRepository <RuuviStation> repositoryRuuviStation, IMapper mapper, IHubContext <RuuviStationHub> hub)
 {
     this._repositoryRuuviStation     = repositoryRuuviStation;
     this._repositoryAgreement        = repositoryAgreement;
     this._serviceAgreementRepository = serviceAgreementRepository;
     this._repositoryGeometric        = repositoryGeometric;
     this._serviceGeometricRepository = serviceGeometricRepository;
     this._mapper = mapper;
     this._hub    = hub;
 }
コード例 #9
0
        public MockRuuviStationRepository(
            IMapper mapper,
            IHubContext <RuuviStationHub> context,
            IMongoDataRepository <Route> repositoryGeometric,
            IMongoDataRepository <ServiceGeometric> serviceGeometricRepository,
            IMongoDataRepository <Agreement> repositoryAgreement,
            IMongoDataRepository <ServiceAgreement> serviceAgreementRepository)
        {
            this._mapper                     = mapper;
            this._context                    = context;
            this._repositoryAgreement        = repositoryAgreement;
            this._serviceAgreementRepository = serviceAgreementRepository;
            this._repositoryGeometric        = repositoryGeometric;
            this._serviceGeometricRepository = serviceGeometricRepository;

            var stations = _random.Next(50, 100);

            for (int i = 0; i < stations; i++)
            {
                var station           = MockRuuviStation();
                var stationStateCount = _random.Next(20, 50);

                station.Time      -= TimeSpan.FromMinutes(5 * stationStateCount);
                station.UpdatedAt -= TimeSpan.FromMinutes(5 * stationStateCount);
                station.CreatedAt -= TimeSpan.FromMinutes(5 * stationStateCount);

                var stationStates = new List <RuuviStation>();
                for (int j = 0; j < stationStateCount; j++)
                {
                    station = MockRuuviStation(station);
                    stationStates.Add(item: station);
                }

                this._stationCollections[station.DeviceId] = stationStates;
            }

            var thread = new Thread(() =>
            {
                while (true)
                {
                    foreach (var(deviceId, stations) in this._stationCollections)
                    {
                        var station = MockRuuviStation(stations.Last());
                        stations.Add(item: station);
                        SendRuuviStation(station);
                        Thread.Sleep(100);
                    }
                }
            });

            thread.IsBackground = true;
            thread.Start();
        }
コード例 #10
0
 public FoodMenuDomainMethods(IDataAccessRespository _dataAccessRespository, IMongoDataRepository _mongoDataRepository)
 {
     dataAccessRespository = _dataAccessRespository;
     mongoDataRepository   = _mongoDataRepository;
 }
コード例 #11
0
 public MeasurementsController(IMongoDataRepository <Station> repository, IMapper mapper)
 {
     this._repository = repository;
     this._mapper     = mapper;
 }
コード例 #12
0
 public AgreementsController(IMongoDataRepository <Agreement> repository, IMongoDataRepository <RuuviStation> repositoryRuuviStation, IMapper mapper)
 {
     _mapper                 = mapper;
     _repository             = repository;
     _repositoryRuuviStation = repositoryRuuviStation;
 }
コード例 #13
0
 public ServiceAgreementController(IMongoDataRepository <Agreement> repositoryConstrain, IMongoDataRepository <RuuviStation> repositoryRuuviStation, IMapper mapper)
 {
     this._repositoryRuuviStation = repositoryRuuviStation;
     this._repositoryConstrain    = repositoryConstrain;
     _mapper = mapper;
 }
コード例 #14
0
 public AgreementsController(IMongoDataRepository <Agreement> repository, IMapper mapper)
 {
     _mapper     = mapper;
     _repository = repository;
 }
コード例 #15
0
 public NotificationsController(IMongoDataRepository <Notification> repository, IMapper mapper)
 {
     _mapper     = mapper;
     _repository = repository;
 }
コード例 #16
0
 public StationsController(IMongoDataRepository <Station> repository, IHubContext <LiveStationHub> hub, IMapper mapper)
 {
     this._repository = repository;
     this._hub        = hub;
     this._mapper     = mapper;
 }
 public ServiceGeometricController(IMongoDataRepository <Route> repositoryConstrain, IMongoDataRepository <RuuviStation> repositoryRuuviStation, IMapper mapper)
 {
     this._repositoryConstrain    = repositoryConstrain;
     this._repositoryRuuviStation = repositoryRuuviStation;
     _mapper = mapper;
 }
コード例 #18
0
 public RuuviStationsController(IMongoDataRepository <RuuviStation> repository, IMapper mapper)
 {
     _mapper     = mapper;
     _repository = repository;
 }
コード例 #19
0
 public RoutesController(IMongoDataRepository <Route> repository, IMongoDataRepository <RuuviStation> repositoryRuuviStation, IMapper mapper)
 {
     _mapper                 = mapper;
     _repository             = repository;
     _repositoryRuuviStation = repositoryRuuviStation;
 }
コード例 #20
0
 public RoutesController(IMongoDataRepository <Route> repository, IMapper mapper)
 {
     _mapper     = mapper;
     _repository = repository;
 }