From 846d0863b6456d3e1e6ccab06d8e61c5cd064194 Mon Sep 17 00:00:00 2001 From: Andrey Akinshin Date: Wed, 17 Oct 2018 12:06:43 +0300 Subject: [PATCH] ParamsAllValuesValidator fixes Move it to the validator folders Support old versions of C# --- .../{Attributes => }/Validators/ParamsAllValuesValidator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/BenchmarkDotNet/{Attributes => }/Validators/ParamsAllValuesValidator.cs (98%) diff --git a/src/BenchmarkDotNet/Attributes/Validators/ParamsAllValuesValidator.cs b/src/BenchmarkDotNet/Validators/ParamsAllValuesValidator.cs similarity index 98% rename from src/BenchmarkDotNet/Attributes/Validators/ParamsAllValuesValidator.cs rename to src/BenchmarkDotNet/Validators/ParamsAllValuesValidator.cs index 6f84d3a0d7..a0a65d33ec 100644 --- a/src/BenchmarkDotNet/Attributes/Validators/ParamsAllValuesValidator.cs +++ b/src/BenchmarkDotNet/Validators/ParamsAllValuesValidator.cs @@ -24,7 +24,7 @@ class ParamsAllValuesValidator : IValidator .SelectMany(type => type.GetTypeMembersWithGivenAttribute(reflectionFlags)) .Distinct() .Select(member => GetErrorOrDefault(member.ParameterType)) - .Where(error => error != default); + .Where(error => error != null); private bool IsBool(Type paramType) => paramType == typeof(bool); private bool IsEnum(Type paramType) => paramType.GetTypeInfo().IsEnum;