Exemplo n.º 1
0
 private void RegisterInterruptStartedCallback()
 {
     _interruptStartedCallback = (CameraPolicy policy, CameraState state, IntPtr userData) =>
     {
         InterruptStarted?.Invoke(this, new CameraInterruptStartedEventArgs(policy, state));
     };
     CameraErrorFactory.ThrowIfError(Native.SetInterruptStartedCallback(_handle, _interruptStartedCallback, IntPtr.Zero),
                                     "Failed to set interrupt callback");
 }
Exemplo n.º 2
0
        private void RegisterInterruptStartedCallback()
        {
            _interruptStartedCallback = (policy, state, _) =>
            {
                InterruptStarted?.Invoke(this, new CameraInterruptStartedEventArgs(policy, state));
            };

            Native.SetInterruptStartedCallback(_handle, _interruptStartedCallback).
            ThrowIfFailed("Failed to set interrupt callback.");
        }