Ejemplo n.º 1
0
 public bool TryOpen(OpenConfiguration openConfig, out DeviceStream stream, out Exception exception)
 {
     try
     {
         stream = Open(openConfig); exception = null; return(true);
     }
     catch (Exception e)
     {
         Debug.WriteLine(e);
         stream = null; exception = e; return(false);
     }
 }
Ejemplo n.º 2
0
        public bool TryOpen(OpenConfiguration openConfig, out DeviceStream stream)
        {
            Exception exception;

            return(TryOpen(openConfig, out stream, out exception));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Tries to make a connection to the device.
 /// </summary>
 /// <param name="stream">The stream to use to communicate with the device.</param>
 /// <returns><c>true</c> if the connection was successful.</returns>
 public bool TryOpen(out DeviceStream stream)
 {
     return(TryOpen(null, out stream));
 }