/// <summary>
 /// Connect the brick through a bluetooth socket
 /// </summary>
 /// <param name="comPortNumber"></param>
 public void UseBlueToothSocket(int comPortNumber)
 {
     if (comPortNumber < 1 || comPortNumber > 256)
     {
         throw new ArgumentOutOfRangeException(nameof(comPortNumber));
     }
     Socket = new SocketOptions {
         Type = SocketType.Bluetooth, Address = $"COM{comPortNumber}"
     };
 }
 /// <summary>
 /// Connect the brick through a network socket
 /// </summary>
 /// <param name="ipAddress">ip adrress e.g. '192.168.2.11'</param>
 public void UseNetworkSocket(string ipAddress)
 {
     if (string.IsNullOrEmpty(ipAddress))
     {
         throw new ArgumentNullException(nameof(ipAddress), "IPAddress is required");
     }
     Socket = new SocketOptions {
         Type = SocketType.Bluetooth, Address = ipAddress
     };
 }
 /// <summary>
 /// Connect the brick through an usb socket
 /// </summary>
 public void UseUsbSocket()
 {
     Socket = new SocketOptions {
         Type = SocketType.Usb
     };
 }