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 22// Licensed under the Apache License, Version 2.0.
33
44using System ;
5+ #if NETSTANDARD1_3
56using System . Reflection ;
7+ #endif
68using System . Runtime . CompilerServices ;
79using SixLabors . ImageSharp ;
810
@@ -20,10 +22,16 @@ internal static partial class Guard
2022 [ MethodImpl ( InliningOptions . ShortMethod ) ]
2123 public static void MustBeValueType < TValue > ( TValue value , string parameterName )
2224 {
23- if ( ! value . GetType ( ) . GetTypeInfo ( ) . IsValueType )
25+ if ( value . GetType ( )
26+ #if NETSTANDARD1_3
27+ . GetTypeInfo ( )
28+ #endif
29+ . IsValueType )
2430 {
25- ThrowHelper . ThrowArgumentException ( "Type must be a struct." , parameterName ) ;
31+ return ;
2632 }
33+
34+ ThrowHelper . ThrowArgumentException ( "Type must be a struct." , parameterName ) ;
2735 }
2836 }
2937}
You can’t perform that action at this time.
0 commit comments