We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ade5ba5 + e7e4c8d commit fd05204Copy full SHA for fd05204
1 file changed
src/ImageSharp/Common/Helpers/Guard.cs
@@ -2,7 +2,9 @@
2
// Licensed under the Apache License, Version 2.0.
3
4
using System;
5
+#if NETSTANDARD1_3
6
using System.Reflection;
7
+#endif
8
using System.Runtime.CompilerServices;
9
using SixLabors.ImageSharp;
10
@@ -20,10 +22,16 @@ internal static partial class Guard
20
22
[MethodImpl(InliningOptions.ShortMethod)]
21
23
public static void MustBeValueType<TValue>(TValue value, string parameterName)
24
{
- if (!value.GetType().GetTypeInfo().IsValueType)
25
+ if (value.GetType()
26
27
+ .GetTypeInfo()
28
29
+ .IsValueType)
30
- ThrowHelper.ThrowArgumentException("Type must be a struct.", parameterName);
31
+ return;
32
}
33
+
34
+ ThrowHelper.ThrowArgumentException("Type must be a struct.", parameterName);
35
36
37
0 commit comments