Browse Source

Update Guard.cs

pull/1888/head
James Jackson-South 5 years ago
parent
commit
1afcb4cd84
  1. 9
      src/ImageSharp/Common/Helpers/Guard.cs

9
src/ImageSharp/Common/Helpers/Guard.cs

@ -2,9 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
#if NETSTANDARD1_3
using System.Reflection;
#endif
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;
@ -22,11 +19,7 @@ namespace SixLabors
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public static void MustBeValueType<TValue>(TValue value, string parameterName) public static void MustBeValueType<TValue>(TValue value, string parameterName)
{ {
if (value.GetType() if (value.GetType().IsValueType)
#if NETSTANDARD1_3
.GetTypeInfo()
#endif
.IsValueType)
{ {
return; return;
} }

Loading…
Cancel
Save