Skip to content

Commit

Permalink
Merge pull request #2160 from ds5678/trim-support
Browse files Browse the repository at this point in the history
Assembly Trimming Support
  • Loading branch information
JimBobSquarePants authored Jul 18, 2022
2 parents 29320a6 + d14e712 commit 909df99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/ImageSharp/ImageSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ExifTagDescriptionAttribute(object value, string description)
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)
{
Expand Down

0 comments on commit 909df99

Please sign in to comment.