From ddf3d56c3a8b21e45c382087070f1e5ad092d9a0 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 11:59:53 -0600 Subject: [PATCH] Fix CS8622, Add nullability annotations to event handler parameters --- .../CameraPreview/samples/CameraPreviewSample.xaml.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/CameraPreview/samples/CameraPreviewSample.xaml.cs b/components/CameraPreview/samples/CameraPreviewSample.xaml.cs index d2750aaa..36964192 100644 --- a/components/CameraPreview/samples/CameraPreviewSample.xaml.cs +++ b/components/CameraPreview/samples/CameraPreviewSample.xaml.cs @@ -92,7 +92,7 @@ protected async override void OnNavigatedFrom(NavigationEventArgs e) await CleanUpAsync(); } - private async void Application_Suspending(object sender, SuspendingEventArgs e) + private async void Application_Suspending(object? sender, SuspendingEventArgs e) { if (Frame?.CurrentSourcePageType == typeof(CameraPreviewSample)) { @@ -102,7 +102,7 @@ private async void Application_Suspending(object sender, SuspendingEventArgs e) } } - private async void Application_Resuming(object sender, object e) + private async void Application_Resuming(object? sender, object e) { if (CameraPreviewControl != null) { @@ -113,19 +113,19 @@ private async void Application_Resuming(object sender, object e) } } - private void CameraPreviewControl_FrameArrived(object sender, FrameEventArgs e) + private void CameraPreviewControl_FrameArrived(object? sender, FrameEventArgs e) { _currentVideoFrame = e.VideoFrame; } - private void CameraPreviewControl_PreviewFailed(object sender, PreviewFailedEventArgs e) + private void CameraPreviewControl_PreviewFailed(object? sender, PreviewFailedEventArgs e) { ErrorBar.Message = e.Error; ErrorBar.IsOpen = true; } - private async void CaptureButton_Click(object sender, RoutedEventArgs e) + private async void CaptureButton_Click(object? sender, RoutedEventArgs e) { var softwareBitmap = _currentVideoFrame?.SoftwareBitmap;