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); } }
public bool TryOpen(OpenConfiguration openConfig, out DeviceStream stream) { Exception exception; return(TryOpen(openConfig, out stream, out exception)); }
/// <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)); }