Ejemplo n.º 1
0
 private void RegisterInterruptedCallback()
 {
     _interruptedCallback = (CameraPolicy policy, CameraState previous, CameraState current, IntPtr userData) =>
     {
         Interrupted?.Invoke(this, new CameraInterruptedEventArgs(policy, previous, current));
     };
     CameraErrorFactory.ThrowIfError(Native.SetInterruptedCallback(_handle, _interruptedCallback, IntPtr.Zero),
                                     "Failed to set interrupt callback");
 }
Ejemplo n.º 2
0
        private void RegisterInterruptedCallback()
        {
            _interruptedCallback = (policy, previous, current, _) =>
            {
                Interrupted?.Invoke(this, new CameraInterruptedEventArgs(policy, previous, current));
            };

            Native.SetInterruptedCallback(_handle, _interruptedCallback).
            ThrowIfFailed("Failed to set interrupt callback.");
        }