private void RegisterFocusStateChanged() { _focusStateChangedCallback = (CameraFocusState state, IntPtr userData) => { FocusStateChanged?.Invoke(this, new CameraFocusStateChangedEventArgs(state)); }; CameraErrorFactory.ThrowIfError(Native.SetFocusStateChangedCallback(_handle, _focusStateChangedCallback, IntPtr.Zero), "Setting focus changed callback failed"); }
private void RegisterFocusStateChanged() { _focusStateChangedCallback = (state, _) => { FocusStateChanged?.Invoke(this, new CameraFocusStateChangedEventArgs(state)); }; Native.SetFocusStateChangedCallback(_handle, _focusStateChangedCallback). ThrowIfFailed("Failed to set focus changed callback."); }