Beispiel #1
0
 public static void Reconnect(Camera camera)
 {
     if (null == camera)
     {
         throw new ArgumentNullException();
     }
     lock (deviceLock)
     {
         ulong devUid = camera.DeviceUid;
         unsafe
         {
             var serviceException = SpotCamService.MakeException(SpotCamService.SpotSetValue(CoreParameter.DeviceUid, new IntPtr(&devUid)));
             if (serviceException != null)
             {
                 throw new InvalidOperationException("Unable to set the device identifier", serviceException);
             }
         }
         SpotCamService.MakeException(SpotCamService.SpotInit()).ThrowIfNotNull();
         currentCamera = camera;
     }
     camera.HandleConnection();
 }
 public static void Reconnect(Camera camera)
 {
     if (null == camera)
         throw new ArgumentNullException();
     lock (deviceLock)
     {
         ulong devUid = camera.DeviceUid;
         unsafe
         {
             var serviceException = SpotCamService.MakeException(SpotCamService.SpotSetValue(CoreParameter.DeviceUid, new IntPtr(&devUid)));
             if (serviceException != null)
                 throw new InvalidOperationException("Unable to set the device identifier", serviceException);
         }
         SpotCamService.MakeException(SpotCamService.SpotInit()).ThrowIfNotNull();
         currentCamera = camera;                
     }
     camera.HandleConnection();
 }