public override IConnection copy () // just copy adress to connect { WinBluetoothConnection copyConnection = new WinBluetoothConnection (); copyConnection.bluetoothAddress = bluetoothAddress; copyConnection.connectedDeviceInfo = connectedDeviceInfo; return copyConnection; }
public override System.Collections.Generic.List<IConnection> findDevices () { List<IConnection> connectionsList = new List<IConnection> (); BluetoothDeviceInfo[] devices = deviceFinder.DiscoverDevices (); for (int a = 0; a < devices.Length; a++) { IConnection ite = new WinBluetoothConnection (devices [a]); connectionsList.Add (ite); } return connectionsList; }
public IConnection createConnection (object obj) { IConnection result = null; if(obj.GetType().Equals(typeof(BluetoothClient))) { var bluetoothClient = (BluetoothClient)obj; var connection = new WinBluetoothConnection(bluetoothClient); result = connection; } return result; }