CA1062: Validate parameter is non-null before using it

When you have a public method that isn’t null checking its parameters, then you’ll get the CA1062 code analysis warning. For example, the following code isn’t null checking the movieRepository parameter: This results in the CA1062 code analysis warning: CA1062 In externally visible method ‘void StreamingService.LogMovies(MovieRepository movieRepository)’, validate parameter ‘movieRepository’ is non-null before using it. … Read more