protected override bool TryCreateBleDevice(object key, out Device device) { var path = (BleDevicePath)key; device = WinBleDevice.TryCreate(path.DevicePath, path.DeviceID, path.FriendlyName); return(device != null); }
internal WinBleStream(WinBleDevice device, WinBleService service) : base(device, service) { _closeEventHandle = NativeMethods.CreateManualResetEventOrThrow(); _watchEventHandle = NativeMethods.CreateManualResetEventOrThrow(); _watchEvents = new Queue <BleEvent>(); _watchMap = new Dictionary <ushort, BleCharacteristic>(); }
internal static WinBleDevice TryCreate(string path, string id, string friendlyName) { var d = new WinBleDevice() { _path = path, _id = id, _friendlyName = friendlyName, _syncObject = new object() }; return(d); }
public WinBleService(WinBleDevice device, NativeMethods.BTH_LE_GATT_SERVICE nativeData) { _device = device; NativeData = nativeData; _syncObject = new object(); }