コード例 #1
0
 public static IConnection CreateConnection(string connectionString)
 {
     return(connectionString.StartsWith(TcpConnectionFactory.Proto)
         ? (IConnection)TcpConnectionFactory.CreateFromString(connectionString)
         : new SerialPortConnection(SerialPortFactory.CreateFromConnectionString(connectionString)));
 }