コード例 #1
0
ファイル: Device.cs プロジェクト: susch19/NoobSwarm.HidSharp
 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
ファイル: Device.cs プロジェクト: susch19/NoobSwarm.HidSharp
        public bool TryOpen(OpenConfiguration openConfig, out DeviceStream stream)
        {
            Exception exception;

            return(TryOpen(openConfig, out stream, out exception));
        }
コード例 #3
0
ファイル: Device.cs プロジェクト: susch19/NoobSwarm.HidSharp
 /// <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));
 }