Skip to content

Commit c1e31f5

Browse files
committed
Clean up
1 parent 218e685 commit c1e31f5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

PdfSharpCore/Pdf/KeysMeta.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,12 @@ public DictionaryMeta([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes
216216
#endif
217217
}
218218

219+
#if !NET5_0_OR_GREATER
219220
// Background: The function GetRuntimeFields gets constant fields only for the specified type,
220221
// not for its base types. So we have to walk recursively through base classes.
221222
// The docmentation says full trust for the immediate caller is required for property BaseClass.
222223
// TODO: Rewrite this stuff for medium trust.
223-
void CollectKeyDescriptors([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type)
224+
void CollectKeyDescriptors(Type type)
224225
{
225226
// Get fields of the specified type only.
226227
var fields = type.GetTypeInfo().DeclaredFields;
@@ -238,6 +239,7 @@ void CollectKeyDescriptors([DynamicallyAccessedMembers(DynamicallyAccessedMember
238239
if (type != typeof(object) && type != typeof(PdfObject))
239240
CollectKeyDescriptors(type);
240241
}
242+
#endif
241243

242244
/// <summary>
243245
/// Gets the KeyDescriptor of the specified key, or null if no such descriptor exits.

SampleApp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
string GetOutFilePath(string name)
55
{
6-
var OutputDirName = @"C:\Users\Arbeit\Documents\";
6+
var OutputDirName = @".";
77
return Path.Combine(OutputDirName, name);
88
}
99

0 commit comments

Comments
 (0)