コード例 #1
0
 public DeviceContext(CentralContext adapterContext,
                      IPeripheral peripheral,
                      BluetoothLEDevice native)
 {
     this.syncLock         = new object();
     this.connSubject      = new Subject <ConnectionState>();
     this.adapterContext   = adapterContext;
     this.subscribers      = new List <GattCharacteristic>();
     this.Peripheral       = peripheral;
     this.NativeDevice     = native;
     this.bluetoothAddress = native.BluetoothAddress;
 }
コード例 #2
0
ファイル: Peripheral.cs プロジェクト: putridparrot/shiny
 public Peripheral(CentralContext centralContext, BluetoothDevice native)
     : base(native.Name, ToDeviceId(native.Address))
 {
     this.connSubject = new Subject <ConnectionState>();
     this.context     = new DeviceContext(centralContext, native);
 }
コード例 #3
0
ファイル: CentralManager.cs プロジェクト: sebnil/shiny
 public CentralManager(CentralContext context)
 {
     this.context = context;
 }
コード例 #4
0
 public CentralManager(CentralContext context)
 {
     this.scanSubject = new Subject <bool>();
     this.context     = context;
 }
コード例 #5
0
ファイル: Peripheral.cs プロジェクト: putridparrot/shiny
 public Peripheral(CentralContext context, CBPeripheral native) : base(native.Name, native.Identifier.ToGuid())
 {
     this.context = context;
     this.Native  = native;
 }
コード例 #6
0
 public Peripheral(CentralContext adapterContext, BluetoothLEDevice native)
 {
     this.context = new DeviceContext(adapterContext, this, native);
     this.Name    = native.Name;
     this.Uuid    = native.GetDeviceId();
 }
コード例 #7
0
 public CentralManager(CentralContext context, IMessageBus messageBus)
 {
     this.context    = context;
     this.messageBus = messageBus;
 }