File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/ImageSharp/Common/Helpers Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 2
2
// Licensed under the Apache License, Version 2.0.
3
3
4
4
using System ;
5
+ #if NETSTANDARD1_3
5
6
using System . Reflection ;
7
+ #endif
6
8
using System . Runtime . CompilerServices ;
7
9
using SixLabors . ImageSharp ;
8
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 )
22
24
{
23
- if ( ! value . GetType ( ) . GetTypeInfo ( ) . IsValueType )
25
+ if ( value . GetType ( )
26
+ #if NETSTANDARD1_3
27
+ . GetTypeInfo ( )
28
+ #endif
29
+ . IsValueType )
24
30
{
25
- ThrowHelper . ThrowArgumentException ( "Type must be a struct." , parameterName ) ;
31
+ return ;
26
32
}
33
+
34
+ ThrowHelper . ThrowArgumentException ( "Type must be a struct." , parameterName ) ;
27
35
}
28
36
}
29
37
}
You can’t perform that action at this time.
0 commit comments