Skip to content

Commit

Permalink
add IgnoreStackTrace to instance level
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Aug 14, 2022
1 parent 77b8269 commit 700e25b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ partial class SerializationSettings
{
List<string> ignoredByNameMembers = new();

public void IgnoreStackTrace() =>
IgnoreMember("StackTrace");

public void IgnoreMember(string name)
{
Guard.AgainstNullOrEmpty(name, nameof(name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static void IgnoreMember<T>(string name)
serialization.IgnoreMember(declaringType, name);

public static void IgnoreStackTrace() =>
serialization.IgnoreMember("StackTrace");
serialization.IgnoreStackTrace();

public static void IgnoreMember(string name) =>
serialization.IgnoreMember(name);
Expand Down

0 comments on commit 700e25b

Please sign in to comment.