private void RegisterErrorCallback() { _errorCallback = (CameraErrorCode error, CameraState current, IntPtr userData) => { ErrorOccurred?.Invoke(this, new CameraErrorOccurredEventArgs(error, current)); }; CameraErrorFactory.ThrowIfError(Native.SetErrorCallback(_handle, _errorCallback, IntPtr.Zero), "Setting error callback failed"); }
private void RegisterErrorCallback() { _errorCallback = (error, current, _) => { ErrorOccurred?.Invoke(this, new CameraErrorOccurredEventArgs(error, current)); }; Native.SetErrorCallback(_handle, _errorCallback). ThrowIfFailed("Setting error callback failed"); }