示例#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);
     }
 }
示例#2
0
        public bool TryOpen(OpenConfiguration openConfig, out DeviceStream stream)
        {
            Exception exception;

            return(TryOpen(openConfig, out stream, out exception));
        }
示例#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));
 }