public RentController(
     IRentRepository rentRepository,
     ICopterRepository copterRepository, IIoTHub hub)
 {
     _rentRepository   = rentRepository;
     _copterRepository = copterRepository;
     _hub = hub;
 }
示例#2
0
        private void SendDataToCloud()
        {
            var data = new
            {
                //Receber dados e enviar.
            };

            IIoTHub.SendData(data, deviceKey);
        }
 public ChequeController(
     IChequeRepository chequeRepository,
     IReportRenderer reportRenderer,
     IMailBox mailBox,
     IIoTHub hub, ICopterRepository copterRepository)
 {
     _chequeRepository = chequeRepository;
     _reportRenderer   = reportRenderer;
     _copterRepository = copterRepository;
     _mailBox          = mailBox;
     _hub = hub;
 }
        /// <summary>
        /// Create sdk factory
        /// </summary>
        /// <param name="hub">Outer hub abstraction</param>
        /// <param name="config">Module framework configuration</param>
        public IoTHubClientFactory(IIoTHub hub, IModuleConfig config)
        {
            _hub = hub ?? throw new ArgumentNullException(nameof(hub));
            if (string.IsNullOrEmpty(config.EdgeHubConnectionString))
            {
                throw new InvalidConfigurationException(
                          "Must have connection string or module id to create clients.");
            }
            var cs = IotHubConnectionStringBuilder.Create(config.EdgeHubConnectionString);

            if (string.IsNullOrEmpty(cs.DeviceId))
            {
                throw new InvalidConfigurationException(
                          "Connection string is not a device or module connection string.");
            }
            DeviceId = cs.DeviceId;
            ModuleId = cs.ModuleId;
        }
示例#5
0
 /// <summary>
 /// Create Registry
 /// </summary>
 public SqlQuery(IIoTHub hub, IJsonSerializer serializer)
 {
     _hub        = hub;
     _serializer = serializer;
 }
示例#6
0
 /// <summary>
 /// Create Registry
 /// </summary>
 public SqlQuery(IIoTHub hub)
 {
     _hub = hub;
 }
示例#7
0
 public Facade(IApiWrapper apiWrapper, IIoTHub iotHub)
 {
     this._apiWrapper = apiWrapper;
     this._iotHub     = iotHub;
 }
示例#8
0
 public ActivityService(IConfiguration configuration, IIoTHub ioTHub)
 {
     this.Configuration = configuration;
     this.IoTHub        = ioTHub;
 }
示例#9
0
 public Facade(IApiWrapper apiWrapper, IIoTHub iotHub, ILockerPiApiWrapper lockerWrapper)
 {
     this._apiWrapper    = apiWrapper;
     this._iotHub        = iotHub;
     this._lockerWrapper = lockerWrapper;
 }
示例#10
0
 private async void InitIoTHub()
 {
     deviceKey = await IIoTHub.AddDeviceAsync(App.deviceName);
 }