예제 #1
0
 public SensorService(
     ISensorRepository sensors,
     ISensorLinkRepository links
     )
 {
     this.m_links   = links;
     this.m_sensors = sensors;
 }
 public LiveDataHandlersController(
     IHttpContextAccessor ctx,
     ISensorLinkRepository links,
     ISensorRepository sensors,
     IApiKeyRepository keys,
     ILiveDataHandlerRepository repo) : base(ctx, sensors, links, keys)
 {
     this.m_repo = repo;
 }
예제 #3
0
 public AbstractDataController(IHttpContextAccessor ctx,
                               ISensorRepository sensors,
                               ISensorLinkRepository links,
                               IApiKeyRepository keys) : base(ctx)
 {
     this.m_sensors = sensors;
     this.m_links   = links;
     this.m_keys    = keys;
 }
 public TriggersController(IHttpContextAccessor ctx,
                           ISensorRepository sensors,
                           ISensorLinkRepository links,
                           ITriggerAdministrationRepository triggers,
                           ICommandPublisher publisher,
                           IApiKeyRepository keys) : base(ctx, sensors, links, keys)
 {
     this.m_triggers = triggers;
     this.m_mqtt     = publisher;
 }
예제 #5
0
 public ExportController(IHttpContextAccessor ctx,
                         IMeasurementRepository measurements,
                         ISensorService sensorService,
                         ISensorRepository sensors,
                         ISensorLinkRepository links,
                         IApiKeyRepository keys) : base(ctx, sensors, links, keys)
 {
     this.m_measurements  = measurements;
     this.m_sensorService = sensorService;
 }
 public BlobsController(IHttpContextAccessor ctx,
                        ISensorRepository sensors,
                        ISensorLinkRepository links,
                        IBlobRepository blobs,
                        IBlobService blobService,
                        IApiKeyRepository keys) : base(ctx, sensors, links, keys)
 {
     this.m_blobs       = blobs;
     this.m_blobService = blobService;
 }
 public MessagesController(IHttpContextAccessor ctx,
                           IMessageRepository messages,
                           ISensorLinkRepository links,
                           IApiKeyRepository keys,
                           ISensorService sensorService,
                           ISensorRepository sensors) : base(ctx, sensors, links, keys)
 {
     this.m_messages      = messages;
     this.m_sensorService = sensorService;
 }
 public MeasurementsController(IMeasurementRepository measurements,
                               ISensorService sensorService,
                               ISensorLinkRepository links,
                               ISensorRepository sensors,
                               IApiKeyRepository keys,
                               ILogger <MeasurementsController> logger,
                               IHttpContextAccessor ctx) : base(ctx, sensors, links, keys)
 {
     this.m_measurements  = measurements;
     this.m_sensorService = sensorService;
     this.m_logger        = logger;
 }
 public StatisticsController(ISensorRepository sensors,
                             ISystemStatisticsRepository systemStats,
                             ISensorLinkRepository links,
                             IAuditLogRepository logs,
                             IUserRepository users,
                             IBlobRepository blobs,
                             IApiKeyRepository keys,
                             ILogger <StatisticsController> loger,
                             IHttpContextAccessor ctx) : base(ctx, sensors, links, keys)
 {
     this._sensors      = sensors;
     this.m_logger      = loger;
     this.m_auditlogs   = logs;
     this.m_users       = users;
     this.m_blobs       = blobs;
     this.m_systemStats = systemStats;
 }
예제 #10
0
 public SensorsController(IHttpContextAccessor ctx,
                          ISensorRepository sensors,
                          ILogger <SensorsController> logger,
                          ISensorLinkRepository links,
                          ITriggerAdministrationRepository triggers,
                          ISensorService sensorService,
                          IAccountRepository accounts,
                          IApiKeyRepository keys,
                          IDistributedCache <PaginationResponse <Sensor> > cache,
                          ICommandPublisher mqtt) : base(ctx, sensors, links, keys)
 {
     this.m_logger        = logger;
     this.m_sensorService = sensorService;
     this.m_mqtt          = mqtt;
     this.m_triggers      = triggers;
     this.m_accounts      = accounts;
     this.m_cache         = cache;
     this.m_rng           = new Random(DateTime.UtcNow.Millisecond * DateTime.UtcNow.Second);
 }
 public GatewayController(IMeasurementAuthorizationService measurementAuth,
                          IMessageAuthorizationService messageAuth,
                          IHttpContextAccessor ctx,
                          ISensorRepository sensors,
                          IApiKeyRepository keys,
                          ISensorLinkRepository links,
                          IBlobRepository blobs,
                          IBlobService blobService,
                          IRouterClient client,
                          IAuthorizationService auth,
                          ILogger <GatewayController> logger) : base(ctx, sensors, links, keys)
 {
     this.m_measurementAuthorizationService = measurementAuth;
     this.m_messageAuthorizationService     = messageAuth;
     this.m_blobService = blobService;
     this.m_blobs       = blobs;
     this.m_client      = client;
     this.m_logger      = logger;
     this.m_auth        = auth;
 }
        public AbstractApiController(
            IHttpContextAccessor ctx,
            ISensorRepository sensors,
            ISensorLinkRepository links,
            IApiKeyRepository keys
            )
        {
            if (ctx?.HttpContext == null)
            {
                return;
            }

            var key = ctx.HttpContext.Items["ApiKey"] as ApiKey;

            this.ApiKey          = key;
            this.CurrentUser     = key?.User;
            this.m_currentUserId = key?.UserId.ToString();
            this.m_sensors       = sensors;
            this.m_links         = links;
            this.m_keys          = keys;
        }
예제 #13
0
 public SensorService(
     ISensorRepository sensors,
     ISensorLinkRepository links,
     IMeasurementRepository measurements,
     ITriggerAdministrationRepository triggers,
     IControlMessageRepository control,
     IMessageRepository messages,
     IApiKeyRepository keys,
     IBlobService blobService,
     IBlobRepository blobs,
     ICommandPublisher mqtt
     )
 {
     this.m_commandPublisher = mqtt;
     this.m_links            = links;
     this.m_sensors          = sensors;
     this.m_control          = control;
     this.m_apiKeys          = keys;
     this.m_measurements     = measurements;
     this.m_triggers         = triggers;
     this.m_messages         = messages;
     this.m_blobService      = blobService;
     this.m_blobs            = blobs;
 }