コード例 #1
0
 public Service(PeripheralConnection connection, BluetoothGattService service)
 {
     _connection      = connection;
     _service         = service;
     _uuid            = new ServiceUuid(service.Uuid.ToUuid());
     _characteristics = _service.Characteristics.SelectArray(ch => new Characteristic(this, ch));
 }
コード例 #2
0
        private ServiceUuid[] ExtractServiceUuids(NSArray array)
        {
            var res = new ServiceUuid[array.Count];

            for (int i = 0; i < res.Length; i++)
            {
                res[i] = array.GetItem <CBUUID>((nuint)i).ToUuid();
            }
            return(res);
        }
コード例 #3
0
 public Service(PeripheralConnection connection, CBService service)
 {
     _connection = connection;
     _service    = service;
     _uuid       = service.UUID.ToUuid();
 }