Browse Source
Merge pull request #2160 from ds5678/trim-support
Assembly Trimming Support
pull/2183/head
James Jackson-South
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
1 deletions
-
src/ImageSharp/ImageSharp.csproj
-
src/ImageSharp/Metadata/Profiles/Exif/ExifTagDescriptionAttribute.cs
|
|
|
@ -24,11 +24,13 @@ |
|
|
|
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true"> |
|
|
|
<PropertyGroup> |
|
|
|
<TargetFrameworks>net7.0;net6.0</TargetFrameworks> |
|
|
|
<IsTrimmable>true</IsTrimmable> |
|
|
|
</PropertyGroup> |
|
|
|
</When> |
|
|
|
<Otherwise> |
|
|
|
<PropertyGroup> |
|
|
|
<TargetFrameworks>net6.0</TargetFrameworks> |
|
|
|
<IsTrimmable>true</IsTrimmable> |
|
|
|
</PropertyGroup> |
|
|
|
</Otherwise> |
|
|
|
</Choose> |
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif |
|
|
|
public static string GetDescription(ExifTag tag, object value) |
|
|
|
{ |
|
|
|
var tagValue = (ExifTagValue)(ushort)tag; |
|
|
|
FieldInfo field = tagValue.GetType().GetTypeInfo().GetDeclaredField(tagValue.ToString()); |
|
|
|
FieldInfo field = typeof(ExifTagValue).GetField(tagValue.ToString(), BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); |
|
|
|
|
|
|
|
if (field is null) |
|
|
|
{ |
|
|
|
|