Skip to content

Commit

Permalink
Update SerializationSettings_IgnoreForMemberOfType.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Aug 14, 2022
1 parent 11956d8 commit a666725
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

partial class SerializationSettings
{
internal Dictionary<Type, List<string>> ignoredMembers = new();
Dictionary<Type, List<string>> ignoredMembers = new();

public void IgnoreMembers<T>(params Expression<Func<T, object?>>[] expressions)
where T : notnull
Expand Down Expand Up @@ -59,7 +59,7 @@ public void IgnoreMember(Type declaringType, string name)
list.Add(name);
}

bool ShouldIgnoreForMemberOfType(Type declaringType, string name) =>
internal bool ShouldIgnoreForMemberOfType(Type declaringType, string name) =>
ignoredMembers.TryGetValue(declaringType, out var names)
&& names.Contains(name);
}

0 comments on commit a666725

Please sign in to comment.