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"); }
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."); }